Skip to content

Commit 5226745

Browse files
parkmiralorenzo
authored andcommitted
Change email_queue.template_vars to longtext. (#32)
issue #31
1 parent eb944f4 commit 5226745

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
use Migrations\AbstractMigration;
3+
use Phinx\Db\Adapter\MysqlAdapter;
4+
5+
class AlterTemplateVarsToEmailQueue extends AbstractMigration
6+
{
7+
8+
/**
9+
* Up Method
10+
*
11+
* More information on this method is available here:
12+
* http://docs.phinx.org/en/latest/migrations.html#the-up-method
13+
*
14+
* @return void
15+
*/
16+
public function up()
17+
{
18+
$this->table('email_queue')
19+
->changeColumn('template_vars', 'text', [
20+
'limit' => MysqlAdapter::TEXT_LONG,
21+
'default' => null,
22+
'null' => false,
23+
])
24+
->update();
25+
}
26+
27+
/**
28+
* Down Method
29+
*
30+
* More information on this method is available here:
31+
* http://docs.phinx.org/en/latest/migrations.html#the-down-method
32+
*
33+
* @return void
34+
*/
35+
public function down()
36+
{
37+
$this->table('email_queue')
38+
->changeColumn('template_vars', 'text', [
39+
'limit' => null,
40+
'default' => null,
41+
'null' => false,
42+
])
43+
->update();
44+
}
45+
}

0 commit comments

Comments
 (0)