File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 22
33namespace yii2mod \settings \tests ;
44
5- use yii \caching \ArrayCache ;
65use yii \helpers \ArrayHelper ;
76use Yii ;
87
@@ -81,18 +80,18 @@ protected function destroyApplication()
8180 protected function setupTestDbData ()
8281 {
8382 $ db = Yii::$ app ->getDb ();
83+
8484 // Structure :
85- $ table = ' Setting ' ;
86- $ columns = [
85+
86+ $ db -> createCommand ()-> createTable ( ' Setting ' , [
8787 'id ' => 'pk ' ,
88- 'type ' => 'string ' ,
89- 'section ' => 'string ' ,
90- 'key ' => 'string ' ,
91- 'value ' => 'text ' ,
92- 'status ' => 'smallint ' ,
93- 'createdAt ' => 'integer ' ,
94- 'updatedAt ' => 'integer ' ,
95- ];
96- $ db ->createCommand ()->createTable ($ table , $ columns )->execute ();
88+ 'type ' => 'string(10) not null ' ,
89+ 'section ' => 'string not null ' ,
90+ 'key ' => 'string not null ' ,
91+ 'value ' => 'text not null ' ,
92+ 'status ' => 'integer ' ,
93+ 'createdAt ' => 'integer not null ' ,
94+ 'updatedAt ' => 'integer not null ' ,
95+ ])->execute ();
9796 }
9897}
You can’t perform that action at this time.
0 commit comments