123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateAlbumCat extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('album_cat', function (Blueprint $table) {
- $table->increments('id');
- $table->string('name')->comment('名称');
- $table->unsignedInteger('parent_id')->default(0)->comment('父分类ID 0--顶级分类');
- $table->string('level')->comment('分类级别');
- $table->longText('pic_url')->default('')->comment('图片url');
- $table->unsignedInteger('is_delete')->default(0)->comment('Is_delete');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('album_cat');
- }
- }
|