Update authentication method
This commit is contained in:
10
db/migrate/20231118054424_create_users.rb
Normal file
10
db/migrate/20231118054424_create_users.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
ROM::SQL.migration do
|
||||
change do
|
||||
create_table :users do
|
||||
uuid :id, primary_key: true
|
||||
column :email, :text, null: false, unique: true
|
||||
end
|
||||
end
|
||||
end
|
12
db/migrate/20231118054707_create_login_token.rb
Normal file
12
db/migrate/20231118054707_create_login_token.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
ROM::SQL.migration do
|
||||
change do
|
||||
create_table :login_tokens do
|
||||
primary_key :id
|
||||
column :user_id, :uuid, null: false
|
||||
column :token, :uuid, null: false
|
||||
column :created_at, :timestamptz, default: Sequel.lit("now()")
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user