芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/public_html/uol/db/migrations/20190214102508_add_layout_enable_stat.php
. */ use Phinx\Migration\AbstractMigration; /** * Class AddLayoutEnableStat */ class AddLayoutEnableStat extends AbstractMigration { /** @inheritdoc */ public function change() { $this->execute('UPDATE `layout` SET createdDt = \'1970-01-01 00:00:00\' WHERE createdDt < \'2000-01-01\''); $this->execute('UPDATE `layout` SET modifiedDt = \'1970-01-01 00:00:00\' WHERE modifiedDt < \'2000-01-01\''); $table = $this->table('layout'); $table ->changeColumn('createdDt', 'datetime', ['null' => true, 'default' => null]) ->changeColumn('modifiedDt', 'datetime', ['null' => true, 'default' => null]) ->addColumn('enableStat', 'integer', ['null' => true]) ->save(); } }