1
0
mirror of https://github.com/bitwarden/server synced 2026-01-10 04:23:31 +00:00

#453 Added PostgreSQL initial db scripts (User) (#556)

* PostgreSQL initial commit of translation from SQL Server to PostgreSQL

* snake_case added.
set search path for schema.  schema qualified name no longer needed for creation and access of functions.

* Table DDL for PostgreSQL
This commit is contained in:
Papina
2019-09-12 03:38:46 +10:00
committed by Kyle Spearrin
parent 12c8e4b124
commit 5000de6fa8
24 changed files with 543 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
DROP TABLE IF EXISTS collection_group;
CREATE TABLE IF NOT EXISTS collection_group (
collection_id UUID NOT NULL,
group_id UUID NOT NULL,
read_only BIT NOT NULL,
CONSTRAINT pk_collection_group PRIMARY KEY (collection_id, group_id),
CONSTRAINT fk_collection_group_collection FOREIGN KEY (collection_id) REFERENCES collection (id),
CONSTRAINT fk_collection_group_group FOREIGN KEY (group_id) REFERENCES "group" (id) ON DELETE CASCADE
);