38 lines
637 B
PHP
38 lines
637 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
class CreateAdvertsTable extends Migration {
|
|
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('adverts', function(Blueprint $table)
|
|
{
|
|
$table->increments('id');
|
|
$table->string('channel', 20)->nullable();
|
|
$table->string('cover')->nullable();
|
|
$table->boolean('sort')->default(99);
|
|
$table->string('url')->comment('地址');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('adverts');
|
|
}
|
|
|
|
}
|