| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230718104253AlertSettingId
- */
- class M230718104253AlertSettingId extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "ALTER TABLE `qimall_mall_setting`
- MODIFY COLUMN `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '表id' FIRST;";
- $sql.= "ALTER TABLE `qimall_addons_setting`
- MODIFY COLUMN `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '表id' FIRST;";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230718104253AlertSettingId cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230718104253AlertSettingId cannot be reverted.\n";
- return false;
- }
- */
- }
|