diff --git a/Migrations/20160417083525_update_version.php b/Migrations/20160417083525_update_version.php deleted file mode 100644 index b61ac989..00000000 --- a/Migrations/20160417083525_update_version.php +++ /dev/null @@ -1,20 +0,0 @@ - 'version', - 'v' => 'v1.04' - ] - ]; - - $this->execute("DELETE FROM `options` WHERE `k` = 'version'"); - $this->insert('options', $option); - } -} diff --git a/Migrations/20160428160038_update_version112.php b/Migrations/20160428160038_update_version112.php index 1813ec8e..c2ae8ea2 100644 --- a/Migrations/20160428160038_update_version112.php +++ b/Migrations/20160428160038_update_version112.php @@ -25,9 +25,13 @@ public function change() $this->execute("DELETE FROM `options` WHERE `k` LIKE '%custom_mail_%'"); $this->insert('options', $option); // update table column 20160427073456 + $table = $this->table('card'); - $table->renameColumn('pram1', 'expireTime'); - $table->changeColumn('expireTime', 'integer', ['null'=> true, 'default'=> 0]); - $table->save(); + $column = $table->hasColumn('pram1'); + if($column) { + $table->renameColumn('pram1', 'expireTime'); + $table->changeColumn('expireTime', 'integer', ['null'=> true, 'default'=> 0]); + $table->save(); + } } }