Commit f14c090e5f932df078cd0047062d683ee428a6b5
1 parent
4428da8c
-Blog migrations started
Showing
4 changed files
with
74 additions
and
0 deletions
Show diff stats
1 | +<?php | ||
2 | + | ||
3 | + use yii\db\Migration; | ||
4 | + | ||
5 | + class m161031_160156_blog extends Migration | ||
6 | + { | ||
7 | + | ||
8 | + public function up() | ||
9 | + { | ||
10 | + $this->createTable( | ||
11 | + 'blog_article', | ||
12 | + [ | ||
13 | + 'id' => $this->primaryKey(), | ||
14 | + 'image' => $this->string(255), | ||
15 | + 'created_at' => $this->integer(), | ||
16 | + 'updated_at' => $this->integer(), | ||
17 | + 'deleted_at' => $this->integer(), | ||
18 | + 'sort' => $this->integer(), | ||
19 | + 'status' => $this->boolean(), | ||
20 | + 'author_id' => $this->integer(), | ||
21 | + ] | ||
22 | + ); | ||
23 | + | ||
24 | + $this->createTable( | ||
25 | + 'blog_article_lang', | ||
26 | + [ | ||
27 | + 'title' => $this->string(255), | ||
28 | + 'body' => $this->text(), | ||
29 | + 'body_preview' => $this->text(), | ||
30 | + 'alias' => $this->string(255), | ||
31 | + 'meta_title' => $this->string(255), | ||
32 | + 'meta_description' => $this->string(255), | ||
33 | + 'h1' => $this->string(255), | ||
34 | + 'seo_text' => $this->string(255), | ||
35 | + ] | ||
36 | + ); | ||
37 | + } | ||
38 | + | ||
39 | + public function down() | ||
40 | + { | ||
41 | + | ||
42 | + } | ||
43 | + } |