Skip to content

Commit

Permalink
Remove primary keys from net tables
Browse files Browse the repository at this point in the history
To remove the possibility of them being used as FKs

Fixes supabase#44
  • Loading branch information
steve-chavez committed Sep 1, 2022
1 parent 751c45b commit c8897fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sql/pg_net--0.4--0.5.sql
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
alter function net._encode_url_with_params_array ( text, text[]) strict;
alter table net.http_request_queue drop constraint http_request_queue_pkey;
alter table net._http_response drop constraint _http_response_pkey;
4 changes: 2 additions & 2 deletions sql/pg_net.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ check (
-- Store pending requests. The background worker reads from here
-- API: Private
create table net.http_request_queue(
id bigserial primary key,
id bigserial,
method net.http_method not null,
url text not null,
headers jsonb not null,
Expand Down Expand Up @@ -40,7 +40,7 @@ execute procedure net._check_worker_is_up();
-- Associates a response with a request
-- API: Private
create table net._http_response(
id bigint primary key,
id bigint,
status_code integer,
content_type text,
headers jsonb,
Expand Down

0 comments on commit c8897fa

Please sign in to comment.