instructeurs: create without providing the email
This commit is contained in:
parent
f131dbb80d
commit
f8358b3ae9
7 changed files with 22 additions and 15 deletions
|
@ -0,0 +1,13 @@
|
|||
class RemoveUniqueConstraintOnInstructeurEmails < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
# Drop the index entirely
|
||||
remove_index :instructeurs, :email
|
||||
# Add the index again, without the unicity constraint
|
||||
add_index :instructeurs, :email
|
||||
end
|
||||
|
||||
def down
|
||||
remove_index :instructeurs, :email
|
||||
add_index :instructeurs, :email, unique: true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue