kuvia/database/migrations/2021_01_11_201731_gallery.php
2021-01-12 17:55:32 +01:00

40 lines
889 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class Gallery extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('galleries', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('name');
$table->string('url');
$table->mediumText("description")->nullable();
$table->unsignedBigInteger("tenant");
$table->date("gallery_create_time")->nullable();
$table->foreign('tenant')->references('id')->on('tenants');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists("galleries");
}
}