M240626025209CreateQimallAddonsScoreBonusErrorLog.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace addons\ScoreBonus\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240626025209CreateQimallAddonsScoreBonusErrorLog
  6. */
  7. class M240626025209CreateQimallAddonsScoreBonusErrorLog extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->execute("CREATE TABLE `qimall_addons_score_bonus_error_log` (
  15. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  16. `mall_id` int(11) DEFAULT NULL COMMENT '商城id',
  17. `bid` int(11) DEFAULT NULL COMMENT '结算周期数据id',
  18. `error_log` text COMMENT '错误日志',
  19. `created_at` int(11) DEFAULT NULL COMMENT '创建时间',
  20. `updated_at` int(11) DEFAULT NULL COMMENT '修改时间',
  21. `date_time` int(11) DEFAULT NULL COMMENT '结算日期',
  22. `json_data` text COMMENT '数据',
  23. PRIMARY KEY (`id`)
  24. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='积分分红结算错误日志'");
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function safeDown()
  30. {
  31. echo "M240626025209CreateQimallAddonsScoreBonusErrorLog cannot be reverted.\n";
  32. return false;
  33. }
  34. /*
  35. // Use up()/down() to run migration code without a transaction.
  36. public function up()
  37. {
  38. }
  39. public function down()
  40. {
  41. echo "M240626025209CreateQimallAddonsScoreBonusErrorLog cannot be reverted.\n";
  42. return false;
  43. }
  44. */
  45. }