@@ 28-38 (lines=11) @@ | ||
25 | * Remember to call "create()" or "update()" and NOT "save()" when working |
|
26 | * with the Table class. |
|
27 | */ |
|
28 | public function change() |
|
29 | { |
|
30 | $table = $this->table('incidents'); |
|
31 | $table |
|
32 | ->addColumn('locale', 'string', [ |
|
33 | 'default' => null, |
|
34 | 'limit' => 30, |
|
35 | 'null' => true, |
|
36 | ]) |
|
37 | ->update(); |
|
38 | } |
|
39 | } |
|
40 |
@@ 13-22 (lines=10) @@ | ||
10 | * http://docs.phinx.org/en/latest/migrations.html#the-change-method |
|
11 | * @return void |
|
12 | */ |
|
13 | public function change() |
|
14 | { |
|
15 | $table = $this->table('incidents'); |
|
16 | $table->changeColumn('error_message', 'string', [ |
|
17 | 'default' => null, |
|
18 | 'limit' => 200, |
|
19 | 'null' => true, |
|
20 | ]); |
|
21 | $table->update(); |
|
22 | } |
|
23 | } |
|
24 |