1
0
mirror of https://github.com/bitwarden/server synced 2025-12-15 15:53:59 +00:00
Files
server/src/Sql/PostgreSQL/Tables/collection_group.sql
Papina 5000de6fa8 #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
2019-09-11 13:38:46 -04:00

12 lines
475 B
SQL

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
);