File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,35 +9,35 @@ public function up()
99
1010 // User Table
1111 $ this ->forge ->addField ([
12- 'id ' => [
12+ 'id ' => [
1313 'type ' => 'INTEGER ' ,
1414 'constraint ' => 3 ,
1515 $ unique_or_auto => true ,
1616 ],
17- 'name ' => [
17+ 'name ' => [
1818 'type ' => 'VARCHAR ' ,
1919 'constraint ' => 80 ,
2020 ],
21- 'email ' => [
21+ 'email ' => [
2222 'type ' => 'VARCHAR ' ,
2323 'constraint ' => 100 ,
2424 ],
25- 'country ' => [
25+ 'country ' => [
2626 'type ' => 'VARCHAR ' ,
2727 'constraint ' => 40 ,
2828 ],
29- 'deleted ' => [
29+ 'deleted ' => [
3030 'type ' => 'TINYINT ' ,
3131 'constraint ' => 1 ,
3232 'default ' => '0 ' ,
3333 ],
3434 'created_at ' => [
35- 'type ' => 'DATETIME ' ,
36- 'null ' => true ,
35+ 'type ' => 'DATETIME ' ,
36+ 'null ' => true ,
3737 ],
3838 'updated_at ' => [
39- 'type ' => 'DATETIME ' ,
40- 'null ' => true ,
39+ 'type ' => 'DATETIME ' ,
40+ 'null ' => true ,
4141 ],
4242 ]);
4343 $ this ->forge ->addKey ('id ' , true );
@@ -58,17 +58,17 @@ public function up()
5858 'type ' => 'TEXT ' ,
5959 'null ' => true ,
6060 ],
61- 'deleted ' => [
61+ 'deleted ' => [
6262 'type ' => 'TINYINT ' ,
6363 'constraint ' => 1 ,
6464 'default ' => '0 ' ,
6565 ],
66- 'created_at ' => [
66+ 'created_at ' => [
6767 'type ' => 'INTEGER ' ,
6868 'constraint ' => 11 ,
6969 'null ' => true ,
7070 ],
71- 'updated_at ' => [
71+ 'updated_at ' => [
7272 'type ' => 'INTEGER ' ,
7373 'constraint ' => 11 ,
7474 'null ' => true ,
@@ -95,22 +95,22 @@ public function up()
9595
9696 // Empty Table
9797 $ this ->forge ->addField ([
98- 'id ' => [
98+ 'id ' => [
9999 'type ' => 'INTEGER ' ,
100100 'constraint ' => 3 ,
101101 $ unique_or_auto => true ,
102102 ],
103- 'name ' => [
103+ 'name ' => [
104104 'type ' => 'VARCHAR ' ,
105105 'constraint ' => 40 ,
106106 ],
107107 'created_at ' => [
108- 'type ' => 'DATE ' ,
109- 'null ' => true ,
108+ 'type ' => 'DATE ' ,
109+ 'null ' => true ,
110110 ],
111111 'updated_at ' => [
112- 'type ' => 'DATE ' ,
113- 'null ' => true ,
112+ 'type ' => 'DATE ' ,
113+ 'null ' => true ,
114114 ],
115115 ]);
116116 $ this ->forge ->addKey ('id ' , true );
@@ -137,11 +137,11 @@ public function up()
137137
138138 public function down ()
139139 {
140- $ this ->forge ->dropTable ('user ' );
141- $ this ->forge ->dropTable ('job ' );
142- $ this ->forge ->dropTable ('misc ' );
143- $ this ->forge ->dropTable ('empty ' );
144- $ this ->forge ->dropTable ('secondary ' );
140+ $ this ->forge ->dropTable ('user ' , true );
141+ $ this ->forge ->dropTable ('job ' , true );
142+ $ this ->forge ->dropTable ('misc ' , true );
143+ $ this ->forge ->dropTable ('empty ' , true );
144+ $ this ->forge ->dropTable ('secondary ' , true );
145145 }
146146
147147 //--------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -19,6 +19,6 @@ public function up()
1919
2020 public function down ()
2121 {
22- $ this ->forge ->dropTable ('foo ' );
22+ $ this ->forge ->dropTable ('foo ' , true );
2323 }
2424}
You can’t perform that action at this time.
0 commit comments