Commit ec5a8378 authored by okhin's avatar okhin 🚴

Fixing the migration with Foreign Key instead of an Index

parent e87549e1
Pipeline #2200 canceled with stages
in 3 minutes and 2 seconds
......@@ -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'})
->removeColumn('alias')
->save();
......
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