m161031_160156_blog.php
1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
use yii\db\Migration;
class m161031_160156_blog extends Migration
{
public function up()
{
$this->createTable(
'blog_article',
[
'id' => $this->primaryKey(),
'image' => $this->string(255),
'created_at' => $this->integer(),
'updated_at' => $this->integer(),
'deleted_at' => $this->integer(),
'sort' => $this->integer(),
'status' => $this->boolean(),
'author_id' => $this->integer(),
]
);
$this->createTable(
'blog_article_lang',
[
'title' => $this->string(255),
'body' => $this->text(),
'body_preview' => $this->text(),
'alias' => $this->string(255),
'meta_title' => $this->string(255),
'meta_description' => $this->string(255),
'h1' => $this->string(255),
'seo_text' => $this->string(255),
]
);
}
public function down()
{
}
}