add email and lower(email) sites index

This commit is contained in:
Kyle Drake 2017-12-08 22:27:34 -08:00
parent 86e188f29f
commit 3aea4e8333
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,9 @@
Sequel.migration do
up {
DB['CREATE INDEX sites_email_lower_index ON sites (LOWER(email))'].first
}
down {
DB['DROP INDEX sites_email_lower_index'].first
}
end

View file

@ -0,0 +1,9 @@
Sequel.migration do
up {
DB.add_index :sites, :email
}
down {
DB.drop_index :sites, :email
}
end