mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-19 21:32:24 +01:00
Add unique constraint to columns label_id, resource_id, resource_name and resource_type in table harbor_resource_label
This commit is contained in:
parent
838b439560
commit
83cfe9814d
@ -287,7 +287,7 @@ create table harbor_resource_label (
|
|||||||
creation_time timestamp default CURRENT_TIMESTAMP,
|
creation_time timestamp default CURRENT_TIMESTAMP,
|
||||||
update_time timestamp default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
update_time timestamp default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY(id),
|
PRIMARY KEY(id),
|
||||||
CONSTRAINT unique_label_resource UNIQUE (label_id,resource_id, resource_type)
|
CONSTRAINT unique_label_resource UNIQUE (label_id,resource_id, resource_name, resource_type)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `alembic_version` (
|
CREATE TABLE IF NOT EXISTS `alembic_version` (
|
||||||
|
@ -281,7 +281,7 @@ create table harbor_resource_label (
|
|||||||
resource_type char(1) NOT NULL,
|
resource_type char(1) NOT NULL,
|
||||||
creation_time timestamp default CURRENT_TIMESTAMP,
|
creation_time timestamp default CURRENT_TIMESTAMP,
|
||||||
update_time timestamp default CURRENT_TIMESTAMP,
|
update_time timestamp default CURRENT_TIMESTAMP,
|
||||||
UNIQUE (label_id,resource_id, resource_type)
|
UNIQUE (label_id,resource_id,resource_name,resource_type)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table alembic_version (
|
create table alembic_version (
|
||||||
|
Loading…
Reference in New Issue
Block a user