| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace addons\Course\console\migrations;
- use yii\db\Migration;
- /**
- * Class M250821030445InsertQimallAddonsCourseOrders
- */
- class M250821030445InsertQimallAddonsCourseOrders extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_course_orders`
- ADD COLUMN `refund_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '售后状态(0:未售后,1:售后中,2:退款完成)',
- ADD COLUMN `refund_at` int(11) NOT NULL DEFAULT 0 COMMENT '退款时间',
- ADD COLUMN `refund_desc` varchar(255) NULL COMMENT '退款原因';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250821030445InsertQimallAddonsCourseOrders cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250821030445InsertQimallAddonsCourseOrders cannot be reverted.\n";
- return false;
- }
- */
- }
|