| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Handles the creation of table `{{%order_prescription_details}}`.
- */
- class M250711065137CreateOrderPrescriptionDetailsTable extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- CREATE TABLE `qimall_order_prescription_details` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) unsigned NOT NULL DEFAULT '0',
- `user_id` int(10) unsigned NOT NULL DEFAULT '0',
- `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
- `symptom` json DEFAULT NULL COMMENT '下单选择的症状',
- `prescription_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '开方状态 (-1 开方失败 0: 未开方 1: 已开方)',
- `prescription_err_msg` varchar(100) NOT NULL DEFAULT '' COMMENT '开方失败消息',
- `img_url` varchar(255) NOT NULL DEFAULT '' COMMENT '处方图片url',
- `medication_recipient` json DEFAULT NULL COMMENT '处方人信息',
- `audit_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '审核状态 -1审核不通过 0待审核 1待复核 2已核发',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1删除,0禁用,1正常]',
- `created_at` int(10) unsigned NOT NULL DEFAULT '0',
- `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`),
- KEY `order_id` (`order_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='处方药商品订单信息表';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- }
|