<?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 EBLUc; E671f: if (!in_array('position', $nmfE0)) { Schema::table('partner', function (Blueprint $GocOS) { $GocOS->string('position', 50)->nullable()->comment('位置'); }); } goto kBMu5; EBLUc: $nmfE0 = ModelManageUtil::listTableColumns('partner'); goto E671f; kBMu5: if (!in_array('sort', $nmfE0)) { Schema::table('partner', function (Blueprint $GocOS) { $GocOS->integer('sort')->nullable()->comment('排序'); }); } goto GOst6; GOst6: } else { Schema::create('partner', function (Blueprint $GocOS) { $GocOS->increments('id'); $GocOS->timestamps(); $GocOS->string('position', 50)->nullable()->comment('位置'); $GocOS->integer('sort')->nullable()->comment('排序'); $GocOS->string('title', 20)->nullable()->comment('名称'); $GocOS->string('logo', 200)->nullable()->comment('Logo'); $GocOS->string('link', 200)->nullable()->comment('链接'); }); } } public function down() { } }