M250120085812CreateBatchFillOrderTable.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace addons\CloudStock\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Handles the creation of table `{{%batch_fill_order}}`.
  6. */
  7. class M250120085812CreateBatchFillOrderTable extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. CREATE TABLE `qimall_addons_cloud_stock_batch_fill_order` (
  16. `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  17. `mall_id` int UNSIGNED NOT NULL DEFAULT 0,
  18. `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '下单用户id',
  19. `trade_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付流水ID',
  20. `trade_no` varchar(100) NOT NULL DEFAULT '' COMMENT '支付流水号',
  21. `full_order_info` json NULL COMMENT '单件补货订单返回值',
  22. `status` tinyint NOT NULL DEFAULT 1,
  23. `created_at` int UNSIGNED NOT NULL DEFAULT 0,
  24. `updated_at` int UNSIGNED NOT NULL DEFAULT 0,
  25. PRIMARY KEY (`id`)
  26. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
  27. SQL;
  28. $this->execute($sql);
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function safeDown()
  34. {
  35. return false;
  36. }
  37. }