Commit ec5a8378 authored by Okhin's avatar Okhin
Browse files

Fixing the migration with Foreign Key instead of an Index

parent e87549e1
......@@ -41,7 +41,7 @@ class UneSeuleAdresse extends AbstractMigration
$this->execute('TRUNCATE TABLE adresses;');
// Add a unique index on user_id
$table->addIndex(['user_id'], ['unique' => true])
$table->addForeignKey('user_id', 'users', 'id', ['delete' => 'CASCADE'})
Supports Markdown
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