File tree 1 file changed +52
-0
lines changed
1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use yii \db \Migration ;
4
+
5
+ /**
6
+ * Class m210805_024643_fecshop_tables
7
+ */
8
+ class m210805_024643_fecshop_tables extends Migration
9
+ {
10
+ /**
11
+ * {@inheritdoc}
12
+ */
13
+ public function safeUp ()
14
+ {
15
+ $ arr = [
16
+ "
17
+ ALTER TABLE `sales_flat_order` ADD `tracking_company_name` VARCHAR( 50 ) NULL AFTER `tracking_company`
18
+ " ,
19
+
20
+ ];
21
+
22
+
23
+ foreach ($ arr as $ sql ) {
24
+ $ this ->execute ($ sql );
25
+ }
26
+ }
27
+
28
+ /**
29
+ * {@inheritdoc}
30
+ */
31
+ public function safeDown ()
32
+ {
33
+ echo "m210805_024643_fecshop_tables cannot be reverted. \n" ;
34
+
35
+ return false ;
36
+ }
37
+
38
+ /*
39
+ // Use up()/down() to run migration code without a transaction.
40
+ public function up()
41
+ {
42
+
43
+ }
44
+
45
+ public function down()
46
+ {
47
+ echo "m210805_024643_fecshop_tables cannot be reverted.\n";
48
+
49
+ return false;
50
+ }
51
+ */
52
+ }
You can’t perform that action at this time.
0 commit comments