Permalink
Browse files

Миграция

  • Loading branch information...
sabian committed Dec 5, 2015
1 parent 4ee5d8b commit 7feff834d603f30d86debccd151738145243455e
Showing with 19 additions and 0 deletions.
  1. +19 −0 install/migrations/m151205_141508_yupe_todo_table.php
@@ -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.