diff --git a/src/Sql/PostgreSQL/Functions/user_create.sql b/src/Sql/PostgreSQL/Functions/user_create.sql index 23e4c4e512..1b90e4c960 100644 --- a/src/Sql/PostgreSQL/Functions/user_create.sql +++ b/src/Sql/PostgreSQL/Functions/user_create.sql @@ -100,4 +100,4 @@ BEGIN _revision_date ); END -$$ \ No newline at end of file +$$ diff --git a/src/Sql/PostgreSQL/Functions/user_read_by_id.sql b/src/Sql/PostgreSQL/Functions/user_read_by_id.sql index db2b542e13..a4780dab68 100644 --- a/src/Sql/PostgreSQL/Functions/user_read_by_id.sql +++ b/src/Sql/PostgreSQL/Functions/user_read_by_id.sql @@ -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$; diff --git a/src/Sql/PostgreSQL/Tables/cipher.sql b/src/Sql/PostgreSQL/Tables/cipher.sql index 4141d489fe..f81c97eac7 100644 --- a/src/Sql/PostgreSQL/Tables/cipher.sql +++ b/src/Sql/PostgreSQL/Tables/cipher.sql @@ -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) );