| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace addons\Certificate\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240708095911CertificateTableAddMemberLevelColumn
- */
- class M240708095911CertificateTableAddMemberLevelColumn extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_certificate`
- ADD COLUMN `member_level` varchar(255) NOT NULL DEFAULT '' COMMENT '允许保存及查看此证书的用户等级';
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240708095911CertificateTableAddMemberLevelColumn cannot be reverted.\n";
- return false;
- }
- */
- }
|