Skip to content

Commit

Permalink
* Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
benedeki committed Jan 12, 2022
1 parent 72d737e commit 224552d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions database/src/main/dataset_schema/_schema.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
*/

CREATE SCHEMA IF NOT EXISTS dataset_schema AUTHORIZATION enceladus;

GRANT USAGE ON SCHEMA dataset_schema TO menas;
4 changes: 2 additions & 2 deletions database/src/main/dataset_schema/add_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DECLARE
_locked BOOLEAN;
_deleted BOOLEAN;
BEGIN
SELECT dsh.schema_latest_version, dsh.locked_when IS NOT NULL, dsh.deleted_when IS NOT NULL
SELECT dsh.schema_latest_version, dsh.locked_when IS NOT NULL, dsh.disabled_when IS NOT NULL
FROM dataset_schema.heads dsh
WHERE dsh.schema_name = i_schema_name
FOR UPDATE
Expand Down Expand Up @@ -92,7 +92,7 @@ BEGIN

INSERT INTO dataset_schema.schemas (schema_name, schema_version, schema_description, fields, updated_by)
VALUES (i_schema_name, i_schema_version, i_schema_description, i_fields, i_user_name)
RETURNING id_schema
RETURNING dataset_schema.schemas.id_schema
INTO id_schema;

IF _latest_version = 0 THEN
Expand Down
4 changes: 2 additions & 2 deletions database/src/main/public/global_id.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
-- SERVER should be a unique number within your deployment between 0 and 9222
CREATE SEQUENCE IF NOT EXISTS public.global_id_seq
INCREMENT 1
START [SERVER_ID]*1000000000000000
MINVALUE [SERVER_ID]*1000000000000000
START [SERVER_ID]*1000000000000000+1
MINVALUE [SERVER_ID]*1000000000000000+1
MAXVALUE [SERVER_ID] + 1)*1000000000000000
CACHE 10;

Expand Down

0 comments on commit 224552d

Please sign in to comment.