M241108110308CreatePaymentTypeRefundStatisticsLogsTable.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Handles the creation of table `{{%payment_type_refund_statistics_logs}}`.
  6. */
  7. class M241108110308CreatePaymentTypeRefundStatisticsLogsTable extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. CREATE TABLE `qimall_payment_type_refund_statistics_logs` (
  16. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  17. `mall_id` int(10) unsigned NOT NULL DEFAULT '0',
  18. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
  19. `statistics_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'qimall_payment_type_refund_statistics 表的 id',
  20. `refund_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '售后id',
  21. `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '订单id',
  22. `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  23. `updated_at` int(10) unsigned NOT NULL DEFAULT '0',
  24. PRIMARY KEY (`id`),
  25. KEY `payment_identifier+refund_id` (`statistics_id`,`refund_id`)
  26. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='记录指定支付方式哪些订单售后成功';
  27. SQL;
  28. $this->execute($sql);
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function safeDown()
  34. {
  35. return false;
  36. }
  37. }