Browse Source

Remove routes and table

pull/611/head
baarkerlounger 4 years ago
parent
commit
03f028689f
  1. 25
      config/routes.rb
  2. 36
      db/migrate/20220525130518_drop_admin_users.rb
  3. 29
      db/schema.rb

25
config/routes.rb

@ -1,28 +1,5 @@
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
Rails.application.routes.draw do
devise_for :admin_users, {
path: :admin,
controllers: {
sessions: "auth/sessions",
passwords: "auth/passwords",
unlocks: "active_admin/devise/unlocks",
registrations: "active_admin/devise/registrations",
confirmations: "active_admin/devise/confirmations",
two_factor_authentication: "auth/two_factor_authentication",
},
path_names: {
sign_in: "sign-in",
sign_out: "sign-out",
two_factor_authentication: "two-factor-authentication",
two_factor_authentication_resend_code: "resend-code",
},
sign_out_via: %i[get],
}
devise_scope :admin_user do
get "admin/two-factor-authentication/resend", to: "auth/two_factor_authentication#show_resend", as: "admin_user_two_factor_authentication_resend"
end
devise_for :users, {
path: :account,
controllers: {
@ -48,8 +25,6 @@ Rails.application.routes.draw do
get "/health", to: ->(_) { [204, {}, [nil]] }
ActiveAdmin.routes(self)
root to: "start#index"
get "/accessibility-statement", to: "content#accessibility_statement"

36
db/migrate/20220525130518_drop_admin_users.rb

@ -0,0 +1,36 @@
class DropAdminUsers < ActiveRecord::Migration[7.0]
def up
drop_table :admin_users
end
def down
create_table "admin_users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at", precision: nil
t.datetime "remember_created_at", precision: nil
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "second_factor_attempts_count", default: 0
t.string "encrypted_otp_secret_key"
t.string "encrypted_otp_secret_key_iv"
t.string "encrypted_otp_secret_key_salt"
t.string "direct_otp"
t.datetime "direct_otp_sent_at", precision: nil
t.datetime "totp_timestamp", precision: nil
t.string "phone"
t.string "name"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at", precision: nil
t.datetime "last_sign_in_at", precision: nil
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.integer "failed_attempts", default: 0
t.string "unlock_token"
t.datetime "locked_at", precision: nil
t.index ["encrypted_otp_secret_key"], name: "index_admin_users_on_encrypted_otp_secret_key", unique: true
t.index ["unlock_token"], name: "index_admin_users_on_unlock_token", unique: true
end
end
end

29
db/schema.rb

@ -14,35 +14,6 @@ ActiveRecord::Schema[7.0].define(version: 2022_05_23_150557) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "admin_users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at", precision: nil
t.datetime "remember_created_at", precision: nil
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "second_factor_attempts_count", default: 0
t.string "encrypted_otp_secret_key"
t.string "encrypted_otp_secret_key_iv"
t.string "encrypted_otp_secret_key_salt"
t.string "direct_otp"
t.datetime "direct_otp_sent_at", precision: nil
t.datetime "totp_timestamp", precision: nil
t.string "phone"
t.string "name"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at", precision: nil
t.datetime "last_sign_in_at", precision: nil
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.integer "failed_attempts", default: 0
t.string "unlock_token"
t.datetime "locked_at", precision: nil
t.index ["encrypted_otp_secret_key"], name: "index_admin_users_on_encrypted_otp_secret_key", unique: true
t.index ["unlock_token"], name: "index_admin_users_on_unlock_token", unique: true
end
create_table "case_logs", force: :cascade do |t|
t.integer "status", default: 0
t.datetime "created_at", null: false

Loading…
Cancel
Save