From eaea55d54291a4b3538df3d3f2a69817e8fade9a Mon Sep 17 00:00:00 2001 From: Kingsley Victor Date: Sun, 10 Nov 2024 12:15:58 +0100 Subject: [PATCH] chore: workerization complete --- supabase/config.toml | 6 +++--- supabase/migrations/20240321140807_init.sql | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/supabase/config.toml b/supabase/config.toml index d5a8151..daad771 100755 --- a/supabase/config.toml +++ b/supabase/config.toml @@ -3,9 +3,9 @@ project_id = "permit-module" [api] -# enabled = true +enabled = true # Port to use for the API URL. -# port = 54321 +port = 54321 # Schemas to expose in your API. Tables, views and stored procedures in this schema will get API # endpoints. public and storage are always included. schemas = ["public", "storage", "graphql_public"] @@ -17,7 +17,7 @@ max_rows = 1000 [db] # Port to use for the local database URL. -# port = 54322 +port = 54322 # Port used by db diff command to initialize the shadow database. shadow_port = 54320 # The database major version to use. This has to be the same as your remote database's. Run `SHOW diff --git a/supabase/migrations/20240321140807_init.sql b/supabase/migrations/20240321140807_init.sql index bbfa41e..c3402f4 100755 --- a/supabase/migrations/20240321140807_init.sql +++ b/supabase/migrations/20240321140807_init.sql @@ -1,14 +1,14 @@ CREATE TABLE IF NOT EXISTS users ( id BIGINT PRIMARY KEY, username VARCHAR(255) UNIQUE NOT NULL, - created_at DATE DEFAULT CURRENT_TIMESTAMP, - updated_at DATE DEFAULT CURRENT_TIMESTAMP + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NOT NULL ); CREATE TABLE IF NOT EXISTS wallets ( wallet_id SERIAL PRIMARY KEY, - user_id BIGINT NOT NULL, - address VARCHAR(255) UNIQUE NOT NULL, - FOREIGN KEY (user_id) REFERENCES users(id) + github_user_id BIGINT NOT NULL, + wallet_address VARCHAR(255) UNIQUE NOT NULL, + FOREIGN KEY (github_user_id) REFERENCES github_users(id) ON DELETE CASCADE ); \ No newline at end of file