<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; use ModStart\Core\Dao\ModelManageUtil; class CreatePartner extends Migration { public function up() { if (ModelManageUtil::hasTable('partner')) { goto QcPAj; A2Sbh: if (!in_array('position', $N5xbg)) { Schema::table('partner', function (Blueprint $hTN3M) { $hTN3M->string('position', 50)->nullable()->comment('位置'); }); } goto zQ_82; zQ_82: if (!in_array('sort', $N5xbg)) { Schema::table('partner', function (Blueprint $hTN3M) { $hTN3M->integer('sort')->nullable()->comment('排序'); }); } goto TuviC; QcPAj: $N5xbg = ModelManageUtil::listTableColumns('partner'); goto A2Sbh; TuviC: } else { Schema::create('partner', function (Blueprint $hTN3M) { $hTN3M->increments('id'); $hTN3M->timestamps(); $hTN3M->string('position', 50)->nullable()->comment('位置'); $hTN3M->integer('sort')->nullable()->comment('排序'); $hTN3M->string('title', 20)->nullable()->comment('名称'); $hTN3M->string('logo', 200)->nullable()->comment('Logo'); $hTN3M->string('link', 200)->nullable()->comment('链接'); }); } } public function down() { } }