@@ 8-36 (lines=29) @@ | ||
5 | /** |
|
6 | * Handles the creation of table `about`. |
|
7 | */ |
|
8 | class m180531_134500_create_about_table extends MultilanguageMigration |
|
9 | { |
|
10 | /** |
|
11 | * {@inheritdoc} |
|
12 | */ |
|
13 | public function safeUp() |
|
14 | { |
|
15 | $this->createMultiLanguageTable('about', |
|
16 | [ |
|
17 | 'title' => $this->string(128)->notNull(), |
|
18 | 'description' => $this->text(), |
|
19 | 'content' => $this->text(), |
|
20 | 'metaKeys' => $this->string(128), |
|
21 | 'metaDescription' => $this->string(), |
|
22 | ], |
|
23 | [ |
|
24 | 'default' => $this->tinyInteger()->defaultValue(0), |
|
25 | ] |
|
26 | ); |
|
27 | } |
|
28 | ||
29 | /** |
|
30 | * {@inheritdoc} |
|
31 | */ |
|
32 | public function safeDown() |
|
33 | { |
|
34 | $this->dropMultiLanguageTable('about'); |
|
35 | } |
|
36 | } |
|
37 |
@@ 8-36 (lines=29) @@ | ||
5 | /** |
|
6 | * Handles the creation of table `home`. |
|
7 | */ |
|
8 | class m180603_123208_create_home_table extends MultilanguageMigration |
|
9 | { |
|
10 | /** |
|
11 | * {@inheritdoc} |
|
12 | */ |
|
13 | public function safeUp() |
|
14 | { |
|
15 | $this->createMultiLanguageTable('home', |
|
16 | [ |
|
17 | 'title' => $this->string(128), |
|
18 | 'description' => $this->text(), |
|
19 | 'content' => $this->text(), |
|
20 | 'metaKeys' => $this->string(128), |
|
21 | 'metaDescription' => $this->string(), |
|
22 | ], |
|
23 | [ |
|
24 | 'default' => $this->tinyInteger()->defaultValue(0), |
|
25 | ] |
|
26 | ); |
|
27 | } |
|
28 | ||
29 | /** |
|
30 | * {@inheritdoc} |
|
31 | */ |
|
32 | public function safeDown() |
|
33 | { |
|
34 | $this->dropMultiLanguageTable('home'); |
|
35 | } |
|
36 | } |
|
37 |