Skip to content

Commit

Permalink
Ensure map_layer row uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
index-git authored and jirik committed Sep 18, 2023
1 parent 6b64cf7 commit b9e57c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layman/upgrade/upgrade_v1_22.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def create_map_layer_relation_table():
id_map integer not null REFERENCES {DB_SCHEMA}.publications (id),
layer_workspace VARCHAR(256) COLLATE pg_catalog."default" not null,
layer_name VARCHAR(256) COLLATE pg_catalog."default" not null,
layer_index integer NOT NULL
layer_index integer NOT NULL,
CONSTRAINT map_layer_unique_row UNIQUE (id_map, layer_workspace, layer_name, layer_index)
)
TABLESPACE pg_default;'''
db_util.run_statement(sql_create_table)
Expand Down

0 comments on commit b9e57c9

Please sign in to comment.