Skip to content

Commit 7feff83

Browse files
committed
Миграция
1 parent 4ee5d8b commit 7feff83

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
class m151205_141508_yupe_todo_table extends yupe\components\DbMigration
4+
{
5+
public function safeUp()
6+
{
7+
$this->createTable('{{todo}}', [
8+
'id' => 'pk',
9+
'description' => 'string NOT NULL',
10+
'status' => 'TINYINT(1) NOT NULL DEFAULT 1',
11+
'sort' => 'integer NOT NULL DEFAULT 1',
12+
], $this->getOptions());
13+
}
14+
15+
public function safeDown()
16+
{
17+
$this->dropTable('{{todo}}');
18+
}
19+
}

0 commit comments

Comments
 (0)