We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ab2c48 commit ef8d752Copy full SHA for ef8d752
migrations/m161109_104201_rename_setting_table.php
@@ -6,22 +6,15 @@ class m161109_104201_rename_setting_table extends Migration
6
{
7
public function up()
8
9
- $this->renameTable('{{%Setting}}', '{{%setting}}');
+ if (Yii::$app->db->schema->getTableSchema('setting') === null) {
10
+ $this->renameTable('{{%Setting}}', '{{%setting}}');
11
+ }
12
}
13
14
public function down()
15
- $this->renameTable('{{%setting}}', '{{%Setting}}');
16
+ if (Yii::$app->db->schema->getTableSchema('Setting') === null) {
17
+ $this->renameTable('{{%setting}}', '{{%Setting}}');
18
19
-
- /*
- // Use safeUp/safeDown to run migration code within a transaction
- public function safeUp()
20
- {
21
- }
22
23
- public function safeDown()
24
25
26
- */
27
-}
+}
0 commit comments