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 507574c commit 0ab0f7bCopy full SHA for 0ab0f7b
migrations/m161109_105445_rename_cms_table.php
@@ -6,22 +6,15 @@ class m161109_105445_rename_cms_table extends Migration
6
{
7
public function up()
8
9
- $this->renameTable('{{%Cms}}', '{{%cms}}');
+ if (Yii::$app->db->schema->getTableSchema('cms') === null) {
10
+ $this->renameTable('{{%Cms}}', '{{%cms}}');
11
+ }
12
}
13
14
public function down()
15
- $this->renameTable('{{%cms}}', '{{%Cms}}');
16
+ if (Yii::$app->db->schema->getTableSchema('Cms') === null) {
17
+ $this->renameTable('{{%cms}}', '{{%Cms}}');
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