| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240603153822AddStoreIdTableImportLog
- */
- class M240603153822AddStoreIdTableImportLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- ALTER TABLE `qimall_import_log` ADD COLUMN `store_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店id' AFTER `updated_at`;
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240603153822AddStoreIdTableImportLog cannot be reverted.\n";
- return false;
- }
- }
|