| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M221007083204AddColumnStoreImgToQimallAddonsStore
- */
- class M221007083204AddColumnStoreImgToQimallAddonsStore extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="ALTER TABLE qimall_addons_store add `store_img` varchar(255) NOT NULL DEFAULT '' COMMENT '门店图片';";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M221007083204AddColumnStoreImgToQimallAddonsStore cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M221007083204AddColumnStoreImgToQimallAddonsStore cannot be reverted.\n";
- return false;
- }
- */
- }
|