| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace addons\Agent\console\migrations;
- use yii\db\Migration;
- /**
- * Class M241011022302AddColumnToAgentDelayLog
- */
- class M241011022302AddColumnToAgentDelayLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_agent_delay_log`
- ADD COLUMN `source_table` varchar(100) NOT NULL DEFAULT '' COMMENT '来源表',
- ADD COLUMN `source_table_id` int UNSIGNED NULL DEFAULT 0 COMMENT '来源表的id';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M241011022302AddColumnToAgentDelayLog cannot be reverted.\n";
- return false;
- }
- */
- }
|