1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateTemplateInfoTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('template_info', function (Blueprint $table) {
- $table->increments('id');
- $table->integer('class_id')->comment('所属分类');
- $table->string('name')->comment('小程序名');
- $table->string('show')->comment('展示图片');
- $table->integer('price')->comment('售价');
- $table->integer('designer_id')->default(0)->comment('设计师');
- $table->char('phone', 11)->comment('联系方式');
- $table->integer('sort')->default(0)->comment('排序号');
- $table->text('pic')->comment('展示截图');
- $table->text('desc')->comment('简介');
- $table->timestamps();
- $table->index('class_id');
- $table->index('designer_id');
- $table->softDeletes();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('template_info');
- }
- }
|