<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class Migrate171031Goods extends Migration { public function up() { foreach (\ModStart\Core\Dao\ModelUtil::all('goods') as $z62M8) { \ModStart\Core\Dao\ModelUtil::update('goods', array('id' => $z62M8['id']), array('sn' => strtoupper(\Illuminate\Support\Str::random(8)))); } } public function down() { } }