ba008812
Administrator
31.03.16 finish 1
|
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
|
<?php
use yii\db\Migration;
class m160331_122305_template_location extends Migration
{
public function up()
{
$this->createTable('{{%template_location}}', [
'template_location_id' => $this->primaryKey(),
'template_location_name' => $this->string(255)->notNull(),
'template_location_title' => $this->string(255),
'width' => $this->integer(4)->notNull(),
'height' => $this->integer(4)->notNull(),
'sort' => $this->integer(6)->notNull(),
'is_slider' => $this->smallInteger(1),
'is_banner' => $this->smallInteger(1),
]);
}
public function down()
{
$this->dropTable('{{%template_location}}');
}
}
|