1
0
mirror of https://github.com/bitwarden/server synced 2025-12-31 07:33:43 +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

@@ -1,14 +1,20 @@
DROP FUNCTION IF EXISTS user_read_by_id;
CREATE OR REPLACE FUNCTION user_read_by_id
(
id uuid
_id uuid
)
RETURNS SETOF "user"
LANGUAGE 'sql'
AS $BODY$
LANGUAGE 'plpgsql'
AS
$BODY$
BEGIN
RETURN QUERY
SELECT
*
FROM
"user"
WHERE
"id" = id;
"id" = _id;
END
$BODY$;