| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Exception;
- use yii\db\Migration;
- /**
- * Class M220907030905AddVideoUrlColumnFirstFrameColumnWatchTimesToQimallAddonsStoreCoupon
- */
- class M221907030905AddStoreImgToQimallAddonsStore 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){
- var_dump($e->getMessage());
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220907030905AddVideoUrlColumnFirstFrameColumnWatchTimesToQimallAddonsStoreCoupon cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220907030905AddVideoUrlColumnFirstFrameColumnWatchTimesToQimallAddonsStoreCoupon cannot be reverted.\n";
- return false;
- }
- */
- }
|