| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230726032353CreateTableOrderUserHandle
- */
- class M230726032353CreateTableOrderUserHandle extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_order_user_handle` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `mall_id` int(11) NOT NULL DEFAULT '0' COMMENT '商城ID',
- `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
- `order_id` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
- `order_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态',
- `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态[-1删除;0禁用;1正常]',
- `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
- `updated_at` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
- PRIMARY KEY (`id`)
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230726032353CreateTableOrderUserHandle cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230726032353CreateTableOrderUserHandle cannot be reverted.\n";
- return false;
- }
- */
- }
|