40 lines
1000 B
PHP
40 lines
1000 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateShowsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('shows', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('name');
|
|
$table->string('alt')->nullable();
|
|
$table->longText('img_url');
|
|
$table->longText('description')->nullable();
|
|
$table->integer('view');
|
|
$table->longText('video_url')->nullable();
|
|
$table->boolean('home')->default(0);
|
|
$table->unsignedInteger('page_id')->nullable();
|
|
$table->foreign('page_id')->references('id')->on('pages');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('shows');
|
|
}
|
|
}
|