| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230130034425AddColumnShowStyleIntoQimallAddonsStoreGoods
- */
- class M230130034425AddColumnShowStyleIntoQimallAddonsStoreGoods extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="ALTER TABLE qimall_addons_store_goods add show_style tinyint(1) not null default 1 COMMENT '商品展示风格:1:;2:';";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230130034425AddColumnShowStyleIntoQimallAddonsStoreGoods cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230130034425AddColumnShowStyleIntoQimallAddonsStoreGoods cannot be reverted.\n";
- return false;
- }
- */
- }
|