Skip to content

Commit

Permalink
merge migrations into a single file
Browse files Browse the repository at this point in the history
  • Loading branch information
privacyguard committed Jul 8, 2024
1 parent 64788c5 commit f0b5820
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 2 additions & 0 deletions migrations/2024-07-01-174833_create_oauth_provider/down.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DROP TABLE oauth_account;

DROP TABLE oauth_provider;

ALTER TABLE local_site
Expand Down
11 changes: 11 additions & 0 deletions migrations/2024-07-01-174833_create_oauth_provider/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@ CREATE TABLE oauth_provider (
ALTER TABLE local_site
ADD COLUMN oauth_registration boolean DEFAULT FALSE NOT NULL;

CREATE TABLE oauth_account (
id serial PRIMARY KEY,
local_user_id int REFERENCES local_user ON UPDATE CASCADE ON DELETE CASCADE NOT NULL,
oauth_provider_id bigint NOT NULL,
oauth_user_id text NOT NULL,
published timestamp with time zone DEFAULT now() NOT NULL,
updated timestamp with time zone,
UNIQUE (oauth_provider_id, oauth_user_id),
UNIQUE (oauth_provider_id, local_user_id)
);

2 changes: 0 additions & 2 deletions migrations/2024-07-01-214047_create_oauth_accounts/down.sql

This file was deleted.

11 changes: 0 additions & 11 deletions migrations/2024-07-01-214047_create_oauth_accounts/up.sql

This file was deleted.

0 comments on commit f0b5820

Please sign in to comment.