Update authentication method

This commit is contained in:
2023-11-18 18:20:29 +11:00
parent 9d9ffc9122
commit 3b3ad66ba3
24 changed files with 273 additions and 25 deletions

View 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

View 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