summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2016-09-27 00:15:01 +0200
committerjomo <github@jomo.tv>2016-09-27 00:15:01 +0200
commitcce749deef267b464c4cb8886d39bfa2d4001fbf (patch)
tree7f7391a7a4298eb140b1d353c16ca94d55875210
parentb057cb591344828ceead2d8b156832d332a9991d (diff)
remove index 'email' from register_tokens
only records with the same UUID are deleted before INSERTing new ones meaning a player could prevent another one from using a certain address when emails are unique. There's no good reason to force uniqueness on emails in this table
-rw-r--r--db/migrate/20160926220738_remove_index_email_from_register_tokens.rb5
-rw-r--r--db/schema.rb3
2 files changed, 6 insertions, 2 deletions
diff --git a/db/migrate/20160926220738_remove_index_email_from_register_tokens.rb b/db/migrate/20160926220738_remove_index_email_from_register_tokens.rb
new file mode 100644
index 0000000..fc6a355
--- /dev/null
+++ b/db/migrate/20160926220738_remove_index_email_from_register_tokens.rb
@@ -0,0 +1,5 @@
+class RemoveIndexEmailFromRegisterTokens < ActiveRecord::Migration
+ def change
+ remove_index :register_tokens, :email
+ end
+end \ No newline at end of file
diff --git a/db/schema.rb b/db/schema.rb
index 376e758..2c68029 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20150825232749) do
+ActiveRecord::Schema.define(version: 20160926220738) do
create_table "blogposts", force: :cascade do |t|
t.string "title"
@@ -82,7 +82,6 @@ ActiveRecord::Schema.define(version: 20150825232749) do
t.string "email", null: false
end
- add_index "register_tokens", ["email"], name: "index_register_tokens_on_email", unique: true, using: :btree
add_index "register_tokens", ["uuid"], name: "index_register_tokens_on_uuid", unique: true, using: :btree
create_table "roles", force: :cascade do |t|