M240606071812AddStoreIdToQimallGoodsSpecsTable.php 638 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240606071812AddStoreIdToQimallGoodsSpecsTable
  6. */
  7. class M240606071812AddStoreIdToQimallGoodsSpecsTable extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. // 增加store_id字段到qimall_goods_specs表
  15. // $this->addColumn('qimall_goods_specs', 'store_id', $this->integer()->notNull()->defaultValue(0)->comment('Store ID'));
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function safeDown()
  21. {
  22. // 移除store_id字段
  23. // $this->dropColumn('qimall_goods_specs', 'store_id');
  24. }
  25. }