From 579883b66bceefe7b50157401bccbf66a6c5d58e Mon Sep 17 00:00:00 2001 From: rtkay123 Date: Wed, 23 Jul 2025 18:54:11 +0200 Subject: feat(auth): tower session --- crates/auth/migrations/20250723100947_account.sql | 1 - crates/auth/migrations/20250723100947_user.sql | 9 +++++++++ crates/auth/migrations/20250723121223_oauth_account.sql | 7 +++++++ 3 files changed, 16 insertions(+), 1 deletion(-) delete mode 100644 crates/auth/migrations/20250723100947_account.sql create mode 100644 crates/auth/migrations/20250723100947_user.sql create mode 100644 crates/auth/migrations/20250723121223_oauth_account.sql (limited to 'crates/auth/migrations') diff --git a/crates/auth/migrations/20250723100947_account.sql b/crates/auth/migrations/20250723100947_account.sql deleted file mode 100644 index 8ddc1d3..0000000 --- a/crates/auth/migrations/20250723100947_account.sql +++ /dev/null @@ -1 +0,0 @@ --- Add migration script here diff --git a/crates/auth/migrations/20250723100947_user.sql b/crates/auth/migrations/20250723100947_user.sql new file mode 100644 index 0000000..440afc7 --- /dev/null +++ b/crates/auth/migrations/20250723100947_user.sql @@ -0,0 +1,9 @@ +-- Add migration script here +create table auth_user ( + id uuid primary key, + email text unique not null, + avatar text, + description text, + updated_at text, + create_at timestamptz not null default now() +); diff --git a/crates/auth/migrations/20250723121223_oauth_account.sql b/crates/auth/migrations/20250723121223_oauth_account.sql new file mode 100644 index 0000000..826fbcc --- /dev/null +++ b/crates/auth/migrations/20250723121223_oauth_account.sql @@ -0,0 +1,7 @@ +CREATE TABLE oauth_account ( + provider_id text not null, + provider_user_id text not null, + user_id uuid not null, + primary key (provider_id, provider_user_id), + foreign key (user_id) references auth_user(id) +); -- cgit v1.2.3