guild/console/migrations/m190715_124941_create_table_holiday.php

31 lines
603 B
PHP
Raw Normal View History

2019-07-16 11:58:05 +03:00
<?php
use yii\db\Migration;
/**
* Class m190715_124941_create_table_holiday
*/
class m190715_124941_create_table_holiday extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('holiday',[
'id' => $this->primaryKey(),
'card_id' => $this->integer(11)->notNull(),
2019-07-16 12:16:13 +03:00
'dt_start' => $this->integer(11)->notNull(),
'dt_end' => $this->integer(11)->notNull(),
2019-07-16 11:58:05 +03:00
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('holiday');
}
}