M241121141030InsertAddonsStoreAddons.php 999 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M241120090450InsertAddonsStoreAddons
  6. */
  7. class M241121141030InsertAddonsStoreAddons extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $time = time();
  15. $sql= "INSERT INTO `qimall_addons_store_addons` (`title`, `name`, `cover`, `brief_introduction`, `status`, `created_at`, `updated_at`) VALUES ('门店会员', 'StoreAssociatedUser', '', '门店会员', 1, {$time}, {$time});
  16. ";
  17. $this->execute($sql);
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function safeDown()
  23. {
  24. echo "M241120090450InsertAddonsStoreAddons cannot be reverted.\n";
  25. return false;
  26. }
  27. /*
  28. // Use up()/down() to run migration code without a transaction.
  29. public function up()
  30. {
  31. }
  32. public function down()
  33. {
  34. echo "M241120090450InsertAddonsStoreAddons cannot be reverted.\n";
  35. return false;
  36. }
  37. */
  38. }