skip sign in tokens

This commit is contained in:
Kay Faraday 2021-09-05 01:41:51 +00:00
parent c067caa700
commit 9b0125d325
2 changed files with 15 additions and 2 deletions

View File

@ -0,0 +1,13 @@
class DisableSignInTokenAuthByDefault < ActiveRecord::Migration[6.1]
def up
safety_assured do
execute 'ALTER TABLE users ALTER COLUMN skip_sign_in_token SET DEFAULT true'
end
end
def down
safety_assured do
execute 'ALTER TABLE users ALTER COLUMN skip_sign_in_token DROP DEFAULT'
end
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_08_08_071221) do
ActiveRecord::Schema.define(version: 2021_09_05_010449) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -946,7 +946,7 @@ ActiveRecord::Schema.define(version: 2021_08_08_071221) do
t.datetime "sign_in_token_sent_at"
t.string "webauthn_id"
t.inet "sign_up_ip"
t.boolean "skip_sign_in_token"
t.boolean "skip_sign_in_token", default: true
t.index ["account_id"], name: "index_users_on_account_id"
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
t.index ["created_by_application_id"], name: "index_users_on_created_by_application_id"