Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

feat: update database architecture #869

Draft
wants to merge 10 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions supabase/migrations/20230111145014_initial_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,3 @@ CREATE TABLE users (
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
);
5 changes: 3 additions & 2 deletions supabase/migrations/20230207011749_create_wallet_table.sql
Original file line number Diff line number Diff line change
@@ -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,
wallet_address character(42)
);
15 changes: 0 additions & 15 deletions supabase/migrations/20230207013753_update_types.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion supabase/migrations/20230509035114_create_access_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions supabase/migrations/20230803154507_setup_permits_policies.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
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;
ALTER TABLE multiplier ENABLE ROW LEVEL SECURITY;

CREATE POLICY "Enable read access for frontend" ON "public"."permits"
AS PERMISSIVE FOR SELECT
Expand Down
Loading