| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230130034214AddColumnIsRecommendIntoQimallAddonsStoreGoods
- */
- class M230130034214AddColumnIsRecommendIntoQimallAddonsStoreGoods extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="ALTER TABLE qimall_addons_store_goods add is_recommend tinyint(1) not null default 0 COMMENT '店铺推荐:0:否;1:是';";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230130034214AddColumnIsRecommendIntoQimallAddonsStoreGoods cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230130034214AddColumnIsRecommendIntoQimallAddonsStoreGoods cannot be reverted.\n";
- return false;
- }
- */
- }
|