1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-22 21:51:22 +01:00

clean up pgsql

This commit is contained in:
Kyle Spearrin 2019-09-11 13:44:56 -04:00
parent 5000de6fa8
commit ba6baa3caa
3 changed files with 5 additions and 5 deletions

View File

@ -100,4 +100,4 @@ BEGIN
_revision_date
);
END
$$
$$

View File

@ -4,7 +4,7 @@ CREATE OR REPLACE FUNCTION user_read_by_id
(
_id uuid
)
RETURNS SETOF "user"
RETURNS SETOF user_view
LANGUAGE 'plpgsql'
AS
$BODY$
@ -13,8 +13,8 @@ BEGIN
SELECT
*
FROM
"user"
user_view
WHERE
"id" = _id;
id = _id;
END
$BODY$;

View File

@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS cipher (
attachments TEXT NULL,
creation_date TIMESTAMPTZ NOT NULL,
revision_date TIMESTAMPTZ NOT NULL,
CONSTRAINT pk_cipher PRIMARY KEY (Id),
CONSTRAINT pk_cipher PRIMARY KEY (id),
CONSTRAINT fk_cipher_organization FOREIGN KEY (organization_id) REFERENCES Organization (id),
CONSTRAINT fk_cipher_user FOREIGN KEY (user_id) REFERENCES "user" (id)
);