Commit 1ee45370 authored by Shakarim Sapa's avatar Shakarim Sapa

Добавлена миграция для таблицы сценариев

parent 302399ac
<?php
use yii\db\Migration;
use yii\db\Schema;
class m160127_082148_trigger_scenario extends Migration
{
/*public function up()
{
}
public function down()
{
echo "m160127_082148_trigger_scenario cannot be reverted.\n";
return false;
}*/
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
$this->createTable(
'scenario',
[
'id' => Schema::TYPE_PK,
'active' => Schema::TYPE_BOOLEAN.' DEFAULT 0',
'owner_id' => Schema::TYPE_INTEGER.' NOT NULL',
'name' => Schema::TYPE_STRING.' NOT NULL',
'description' => Schema::TYPE_TEXT,
'date_create' => Schema::TYPE_DATETIME.' NOT NULL'
]
);
}
public function safeDown()
{
$this->dropTable('scenario');
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment