<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class MigrateAreaChina extends Migration { public function up() { goto U9B9w; U9B9w: $tM63P = \ModStart\Core\Dao\ModelManageUtil::table('area_china'); goto FbIbh; pckNA: Schema::table('area_china', function (Blueprint $tM63P) { $tM63P->renameColumn('parentAreaId', 'pid'); $tM63P->renameColumn('name', 'title'); $tM63P->dropColumn('areaId'); }); goto KpYsZ; FbIbh: \ModStart\Core\Dao\ModelManageUtil::statement("UPDATE `{$tM63P}` SET `id`=`areaId`"); goto pckNA; KpYsZ: } public function down() { } }