add_holidays
This commit is contained in:
30
console/migrations/m190715_124941_create_table_holiday.php
Normal file
30
console/migrations/m190715_124941_create_table_holiday.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?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(),
|
||||
'dt_start' => $this->integer(15)->notNull(),
|
||||
'dt_end' => $this->integer(15)->notNull(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
{
|
||||
$this->dropTable('holiday');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user