mirror of
https://github.com/bitwarden/server
synced 2025-12-15 15:53:59 +00:00
* 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
12 lines
475 B
SQL
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
|
|
);
|
|
|