Migrate to Rais 8.0
- Remove all Rodauth stuff and implement simple custom auth - Migrate from sprockets to propshaft, hack some bootstrap stuff
This commit is contained in:
parent
0198a22278
commit
c35c7da6e0
66 changed files with 518 additions and 684 deletions
11
db/migrate/20241108175901_create_users.rb
Normal file
11
db/migrate/20241108175901_create_users.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class CreateUsers < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :users do |t|
|
||||
t.string :email_address, null: false
|
||||
t.string :password_digest, null: false
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :users, :email_address, unique: true
|
||||
end
|
||||
end
|
||||
11
db/migrate/20241108175905_create_sessions.rb
Normal file
11
db/migrate/20241108175905_create_sessions.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class CreateSessions < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
create_table :sessions do |t|
|
||||
t.references :user, null: false, foreign_key: true
|
||||
t.string :ip_address
|
||||
t.string :user_agent
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
17
db/migrate/20241108180654_drop_accounts.rb
Normal file
17
db/migrate/20241108180654_drop_accounts.rb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class DropAccounts < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
# Used by the remember me feature
|
||||
drop_table :account_remember_keys, id: false do |t|
|
||||
t.integer :id, primary_key: true
|
||||
t.foreign_key :accounts, column: :id
|
||||
t.string :key, null: false
|
||||
t.datetime :deadline, null: false
|
||||
end
|
||||
drop_table :accounts do |t|
|
||||
t.integer :status, null: false, default: 1
|
||||
t.string :email, null: false
|
||||
t.index :email, unique: true, where: "status IN (1, 2)"
|
||||
t.string :password_hash
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue