Skip to content

Commit

Permalink
Миграция
Browse files Browse the repository at this point in the history
  • Loading branch information
sabian committed Dec 5, 2015
1 parent 4ee5d8b commit 7feff83
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions install/migrations/m151205_141508_yupe_todo_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

class m151205_141508_yupe_todo_table extends yupe\components\DbMigration
{
public function safeUp()
{
$this->createTable('{{todo}}', [
'id' => 'pk',
'description' => 'string NOT NULL',
'status' => 'TINYINT(1) NOT NULL DEFAULT 1',
'sort' => 'integer NOT NULL DEFAULT 1',
], $this->getOptions());
}

public function safeDown()
{
$this->dropTable('{{todo}}');
}
}

0 comments on commit 7feff83

Please sign in to comment.