account page stubbed: link to etsy sign up

This commit is contained in:
2025-12-29 06:06:13 -07:00
parent 61f9afb39c
commit c9100383e4
35 changed files with 1326 additions and 158 deletions
@@ -0,0 +1 @@
DROP TABLE accounts CASCADE;
@@ -0,0 +1,9 @@
CREATE TABLE accounts (
account_id SERIAL NOT NULL,
email TEXT NOT NULL,
verified BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (account_id)
);
CREATE UNIQUE INDEX ON accounts (email);
@@ -0,0 +1,2 @@
DROP TABLE etsy_access_tokens;
DROP TABLE etsy_users;
@@ -0,0 +1,19 @@
CREATE TABLE etsy_users (
account_id INTEGER NOT NULL,
user_id INTEGER NOT NULL,
store_id INTEGER NOT NULL,
PRIMARY KEY (user_id),
FOREIGN KEY (account_id) REFERENCES accounts
);
CREATE TABLE etsy_access_tokens (
user_id INTEGER NOT NULL,
access_token TEXT NOT NULL,
refresh_token TEXT NOT NULL,
access_token_expiration TIMESTAMPTZ NOT NULL,
refresh_token_expiration TIMESTAMPTZ NOT NULL,
PRIMARY KEY (user_id),
FOREIGN KEY (user_id) REFERENCES etsy_users
);
@@ -0,0 +1 @@
DROP TABLE etsy_oauth_requests CASCADE;
@@ -0,0 +1,11 @@
CREATE TABLE etsy_oauth_requests (
account_id INTEGER NOT NULL,
state BYTEA NOT NULL,
code_verifier BYTEA NOT NULL,
expiration TIMESTAMPTZ NOT NULL,
PRIMARY KEY (state),
FOREIGN KEY (account_id) REFERENCES accounts
);
CREATE UNIQUE INDEX ON etsy_oauth_requests (state);