| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240926070654ModifyOrderModifyShippingAddressLogTableStatusColumn
- */
- class M240926070654ModifyOrderModifyShippingAddressLogTableStatusColumn extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- ALTER TABLE `qimall_order_modify_shipping_address_log`
- MODIFY COLUMN `status` tinyint(3) NOT NULL DEFAULT 1 COMMENT '-1删除 0禁用 1正常' AFTER `order_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 "M240926070654ModifyOrderModifyShippingAddressLogTableStatusColumn cannot be reverted.\n";
- return false;
- }
- */
- }
|