| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M231025074546AlterQimallUserLevelIsSpecifiedLevel
- */
- class M231025074546AlterQimallUserLevelIsSpecifiedLevel extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_user_level`
- ADD COLUMN `is_specified_level` tinyint(1) NOT NULL DEFAULT 0 COMMENT '指定等级会员价展示[0否;1是]',
- ADD COLUMN `specified_level` varchar(255) NOT NULL DEFAULT '' COMMENT '指定等级';";
- $this->execute($sql);
- $sql = "ALTER TABLE `qimall_goods_attr`
- ADD COLUMN `is_show` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否显示[0隐藏; 1显示]';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M231025074546AlterQimallUserLevelIsSpecifiedLevel cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M231025074546AlterQimallUserLevelIsSpecifiedLevel cannot be reverted.\n";
- return false;
- }
- */
- }
|