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