<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; use ModStart\Core\Dao\ModelManageUtil; class CreateBanner extends Migration { public function up() { if (ModelManageUtil::hasTable('banner')) { goto uIFX4; u1xjt: if (!in_array('position', $U9D69)) { Schema::table('banner', function (Blueprint $tM63P) { $tM63P->string('position', 50)->nullable()->comment('位置'); }); } goto h81jj; h81jj: if (!in_array('sort', $U9D69)) { Schema::table('banner', function (Blueprint $tM63P) { $tM63P->integer('sort')->nullable()->comment('顺序'); }); } goto S1j_Q; uIFX4: $U9D69 = ModelManageUtil::listTableColumns('banner'); goto u1xjt; S1j_Q: } else { Schema::create('banner', function (Blueprint $tM63P) { $tM63P->increments('id'); $tM63P->timestamps(); $tM63P->string('position', 50)->nullable()->comment('位置'); $tM63P->integer('sort')->nullable()->comment('顺序'); $tM63P->string('image', 100)->nullable()->comment('图片'); $tM63P->string('link', 200)->nullable()->comment('链接'); }); } } public function down() { } }