mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Add unique index for invite code tokens (#267)
This commit is contained in:
parent
c10fab9a7c
commit
841d5aaf50
2 changed files with 7 additions and 1 deletions
|
@ -0,0 +1,5 @@
|
|||
class AddTokenIndexToInviteCodes < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_index :invite_codes, :token, unique: true
|
||||
end
|
||||
end
|
3
db/schema.rb
generated
3
db/schema.rb
generated
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_02_03_030754) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2024_02_03_050018) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
|
@ -79,6 +79,7 @@ ActiveRecord::Schema[7.2].define(version: 2024_02_03_030754) do
|
|||
t.string "token", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["token"], name: "index_invite_codes_on_token", unique: true
|
||||
end
|
||||
|
||||
create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue