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