Commit 10f22dc1 authored by Shakarim Sapa's avatar Shakarim Sapa

Добавлены индексы перед попыткой создать ключи

parent 770e6cd4
......@@ -31,6 +31,7 @@ class m160127_082148_trigger_scenario extends Migration
'date_create' => Schema::TYPE_DATETIME.' NOT NULL'
]
);
$this->createIndex('index_scenario_owner_id', 'trigger_scenario', 'owner_id');
$this->addForeignKey(
'fk_scenario_owner_id_users_id',
'trigger_scenario', 'owner_id',
......@@ -41,6 +42,7 @@ class m160127_082148_trigger_scenario extends Migration
public function safeDown()
{
$this->dropForeignKey('fk_scenario_owner_id_users_id', 'trigger_scenario');
$this->dropIndex('index_scenario_owner_id', 'trigger_scenario');
$this->dropTable('trigger_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