File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77class ChangeRegionToSubnational extends Migration
88{
9- /**
10- * Run the migrations.
11- *
12- * @return void
13- */
149 public function up ()
1510 {
11+ Schema::table ('usage_logs ' , function (Blueprint $ table ) {
12+ $ table ->string ('subnational ' )->nullable ();
13+ });
14+
1615 DB ::table ('usage_logs ' )->update ([
1716 'subnational ' => DB ::raw ('region ' )
1817 ]);
18+
19+ Schema::table ('usage_logs ' , function (Blueprint $ table ) {
20+ $ table ->dropColumn ('region ' );
21+ });
1922 }
20-
21- /**
22- * Reverse the migrations.
23- *
24- * @return void
25- */
23+
2624 public function down ()
27- {
25+ {
26+ Schema::table ('usage_logs ' , function (Blueprint $ table ) {
27+ $ table ->string ('region ' )->nullable ();
28+ });
2829
29- DB ::table ('usage_logs ' )->update ([
30- 'region ' => DB ::raw ('subnational ' )
31- ]);
32- }
30+ DB ::table ('usage_logs ' )->update ([
31+ 'region ' => DB ::raw ('subnational ' )
32+ ]);
33+
34+ Schema::table ('usage_logs ' , function (Blueprint $ table ) {
35+ $ table ->dropColumn ('subnational ' );
36+ });
37+ }
3338}
You can’t perform that action at this time.
0 commit comments