File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use app \components \Migration ;
4+
5+ class m161109_104201_rename_setting_table extends Migration
6+ {
7+ public function up ()
8+ {
9+ $ this ->renameTable ('{{%Setting}} ' , '{{%setting}} ' );
10+ }
11+
12+ public function down ()
13+ {
14+ $ this ->renameTable ('{{%setting}} ' , '{{%Setting}} ' );
15+ }
16+
17+ /*
18+ // Use safeUp/safeDown to run migration code within a transaction
19+ public function safeUp()
20+ {
21+ }
22+
23+ public function safeDown()
24+ {
25+ }
26+ */
27+ }
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class SettingModel extends ActiveRecord
2929 */
3030 public static function tableName ()
3131 {
32- return '{{%Setting }} ' ;
32+ return '{{%setting }} ' ;
3333 }
3434
3535 /**
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ protected function setupTestDbData()
8383
8484 // Structure :
8585
86- $ db ->createCommand ()->createTable ('Setting ' , [
86+ $ db ->createCommand ()->createTable ('setting ' , [
8787 'id ' => 'pk ' ,
8888 'type ' => 'string(10) not null ' ,
8989 'section ' => 'string not null ' ,
You can’t perform that action at this time.
0 commit comments