From 58179d02e00cd268047dcbf021e04838e2811b98 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 14:18:06 +0000 Subject: [PATCH 01/10] test: update remove issues table --- .../migrations/20230207013753_update_types.sql | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/supabase/migrations/20230207013753_update_types.sql b/supabase/migrations/20230207013753_update_types.sql index 5a349e874..0010f9c35 100644 --- a/supabase/migrations/20230207013753_update_types.sql +++ b/supabase/migrations/20230207013753_update_types.sql @@ -4,21 +4,6 @@ ALTER COLUMN created_at TYPE timestamp without time zone using created_at::times ALTER TABLE public.users ALTER COLUMN updated_at TYPE timestamp without time zone using updated_at::timestamp; -ALTER TABLE public.issues -ALTER COLUMN created_at TYPE timestamp without time zone using created_at::timestamp; - -ALTER TABLE public.issues -ALTER COLUMN updated_at TYPE timestamp without time zone using updated_at::timestamp; - -ALTER TABLE public.issues -ALTER COLUMN started_at TYPE timestamp without time zone using started_at::timestamp; - -ALTER TABLE public.issues -ALTER COLUMN completed_at TYPE timestamp without time zone using completed_at::timestamp; - -ALTER TABLE public.issues -ALTER COLUMN closed_at TYPE timestamp without time zone using closed_at::timestamp; - ALTER TABLE public.wallets ALTER COLUMN created_at TYPE timestamp without time zone using created_at::timestamp; From 5b90ec85847ad39a92e2234e802d1c4c81d97f60 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 14:44:21 +0000 Subject: [PATCH 02/10] test: update db --- supabase/migrations/20230803154507_setup_permits_policies.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/supabase/migrations/20230803154507_setup_permits_policies.sql b/supabase/migrations/20230803154507_setup_permits_policies.sql index 7c2828580..72c697d86 100644 --- a/supabase/migrations/20230803154507_setup_permits_policies.sql +++ b/supabase/migrations/20230803154507_setup_permits_policies.sql @@ -1,7 +1,6 @@ ALTER TABLE permits ENABLE ROW LEVEL SECURITY; ALTER TABLE wallets ENABLE ROW LEVEL SECURITY; ALTER TABLE users ENABLE ROW LEVEL SECURITY; -ALTER TABLE issues ENABLE ROW LEVEL SECURITY; ALTER TABLE weekly ENABLE ROW LEVEL SECURITY; ALTER TABLE access ENABLE ROW LEVEL SECURITY; ALTER TABLE penalty ENABLE ROW LEVEL SECURITY; From dd05f651e4b910fa57303edea786057ddf6a7403 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 14:47:22 +0000 Subject: [PATCH 03/10] test: update db --- supabase/migrations/20230207011749_create_wallet_table.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/supabase/migrations/20230207011749_create_wallet_table.sql b/supabase/migrations/20230207011749_create_wallet_table.sql index a10d3ef48..ab88359c1 100644 --- a/supabase/migrations/20230207011749_create_wallet_table.sql +++ b/supabase/migrations/20230207011749_create_wallet_table.sql @@ -1,6 +1,7 @@ CREATE TABLE wallets ( - user_name character varying(255) NOT NULL PRIMARY KEY, - wallet_address character(42), + id SERIAL PRIMARY KEY, created_at text, updated_at text + user_name character varying(255) NOT NULL PRIMARY KEY, + wallet_address character(42), ); \ No newline at end of file From e1cf84899d089c652194e9d9cf051cabc0d0a924 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 14:49:33 +0000 Subject: [PATCH 04/10] test: drop issues table --- .../20230111145014_initial_schema.sql | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/supabase/migrations/20230111145014_initial_schema.sql b/supabase/migrations/20230111145014_initial_schema.sql index 1a512b4cc..298564332 100644 --- a/supabase/migrations/20230111145014_initial_schema.sql +++ b/supabase/migrations/20230111145014_initial_schema.sql @@ -26,25 +26,4 @@ CREATE TABLE users ( wallet_address character(42), created_at text, updated_at text -); - -CREATE TABLE issues ( - id SERIAL PRIMARY KEY, - issue_number integer NOT NULL, - issue_url text NOT NULL, - comments_url text NOT NULL, - events_url text NOT NULL, - labels text[], - assignees text[], - status issue_status DEFAULT 'READY_TO_START'::issue_status NOT NULL, - timeline text, - priority text, - price text, - txhash text[], - recipient character(42), - started_at text, - completed_at text, - closed_at text, - created_at text, - updated_at text ); \ No newline at end of file From 468fadd22630a4d8c2709d9612b4f13fdcdc221d Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 14:50:10 +0000 Subject: [PATCH 05/10] test: drop issues table --- supabase/migrations/20230111145014_initial_schema.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/migrations/20230111145014_initial_schema.sql b/supabase/migrations/20230111145014_initial_schema.sql index 298564332..a63fc633d 100644 --- a/supabase/migrations/20230111145014_initial_schema.sql +++ b/supabase/migrations/20230111145014_initial_schema.sql @@ -26,4 +26,4 @@ CREATE TABLE users ( wallet_address character(42), created_at text, updated_at text -); \ No newline at end of file +); From 713f4da0d5fce86c693e0a46a38ee7e8dc9543c2 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 16:16:34 +0000 Subject: [PATCH 06/10] test: update primary key --- supabase/migrations/20230207011749_create_wallet_table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/migrations/20230207011749_create_wallet_table.sql b/supabase/migrations/20230207011749_create_wallet_table.sql index ab88359c1..5674e7d87 100644 --- a/supabase/migrations/20230207011749_create_wallet_table.sql +++ b/supabase/migrations/20230207011749_create_wallet_table.sql @@ -2,6 +2,6 @@ CREATE TABLE wallets ( id SERIAL PRIMARY KEY, created_at text, updated_at text - user_name character varying(255) NOT NULL PRIMARY KEY, + user_name character varying(255) NOT NULL, wallet_address character(42), ); \ No newline at end of file From dd14ed2c01e18f99a489f70f028d0e50c8e19132 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 20:59:46 +0000 Subject: [PATCH 07/10] test: remove multiplier table and migration --- .../migrations/20230728083746_create_multiplier_table.sql | 7 ------- .../20230728105752_drop_multiplier_in_wallets.sql | 3 --- 2 files changed, 10 deletions(-) delete mode 100644 supabase/migrations/20230728083746_create_multiplier_table.sql delete mode 100644 supabase/migrations/20230728105752_drop_multiplier_in_wallets.sql diff --git a/supabase/migrations/20230728083746_create_multiplier_table.sql b/supabase/migrations/20230728083746_create_multiplier_table.sql deleted file mode 100644 index 0cbd72624..000000000 --- a/supabase/migrations/20230728083746_create_multiplier_table.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE multiplier ( - user_id character varying(255) NOT NULL PRIMARY KEY, - value numeric, - reason text, - created_at TIMESTAMP WITHOUT TIME ZONE, - updated_at TIMESTAMP WITHOUT TIME ZONE -); \ No newline at end of file diff --git a/supabase/migrations/20230728105752_drop_multiplier_in_wallets.sql b/supabase/migrations/20230728105752_drop_multiplier_in_wallets.sql deleted file mode 100644 index 1dd687a4d..000000000 --- a/supabase/migrations/20230728105752_drop_multiplier_in_wallets.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE wallets -DROP COLUMN multiplier, -DROP COLUMN reason; \ No newline at end of file From f189a1bc4407125ad1d6547c9bc28d60288d4ca8 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 21:01:22 +0000 Subject: [PATCH 08/10] test: update --- supabase/migrations/20230207011749_create_wallet_table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase/migrations/20230207011749_create_wallet_table.sql b/supabase/migrations/20230207011749_create_wallet_table.sql index 5674e7d87..d909a7015 100644 --- a/supabase/migrations/20230207011749_create_wallet_table.sql +++ b/supabase/migrations/20230207011749_create_wallet_table.sql @@ -3,5 +3,5 @@ CREATE TABLE wallets ( created_at text, updated_at text user_name character varying(255) NOT NULL, - wallet_address character(42), + wallet_address character(42) ); \ No newline at end of file From 32bb530a13244917e013ef3920b45543f055967c Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 21:04:14 +0000 Subject: [PATCH 09/10] test: update --- .../migrations/20230428060116_add_multiplier_to_wallets.sql | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 supabase/migrations/20230428060116_add_multiplier_to_wallets.sql diff --git a/supabase/migrations/20230428060116_add_multiplier_to_wallets.sql b/supabase/migrations/20230428060116_add_multiplier_to_wallets.sql deleted file mode 100644 index 99574a27c..000000000 --- a/supabase/migrations/20230428060116_add_multiplier_to_wallets.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE public.wallets -ADD COLUMN IF NOT EXISTS multiplier numeric DEFAULT 1 \ No newline at end of file From 309ba38bab5787900bdece5e42394f7c25753a10 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 22 Oct 2023 21:05:24 +0000 Subject: [PATCH 10/10] test: update --- supabase/migrations/20230509035114_create_access_table.sql | 1 - supabase/migrations/20230803154507_setup_permits_policies.sql | 1 - 2 files changed, 2 deletions(-) diff --git a/supabase/migrations/20230509035114_create_access_table.sql b/supabase/migrations/20230509035114_create_access_table.sql index 40d65b4ac..dd7720a38 100644 --- a/supabase/migrations/20230509035114_create_access_table.sql +++ b/supabase/migrations/20230509035114_create_access_table.sql @@ -4,7 +4,6 @@ CREATE TABLE access ( priority_access boolean, time_access boolean, price_access boolean, - multiplier_access boolean, created_at TIMESTAMP WITHOUT TIME ZONE, updated_at TIMESTAMP WITHOUT TIME ZONE ); \ No newline at end of file diff --git a/supabase/migrations/20230803154507_setup_permits_policies.sql b/supabase/migrations/20230803154507_setup_permits_policies.sql index 72c697d86..b1fbc2db1 100644 --- a/supabase/migrations/20230803154507_setup_permits_policies.sql +++ b/supabase/migrations/20230803154507_setup_permits_policies.sql @@ -4,7 +4,6 @@ ALTER TABLE users ENABLE ROW LEVEL SECURITY; ALTER TABLE weekly ENABLE ROW LEVEL SECURITY; ALTER TABLE access ENABLE ROW LEVEL SECURITY; ALTER TABLE penalty ENABLE ROW LEVEL SECURITY; -ALTER TABLE multiplier ENABLE ROW LEVEL SECURITY; CREATE POLICY "Enable read access for frontend" ON "public"."permits" AS PERMISSIVE FOR SELECT