mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 17:17:46 +01:00
Merge pull request #4510 from reasonerjt/master
Add indexes to job tables and bump up schema version.
This commit is contained in:
commit
2c2cbd9c52
@ -199,7 +199,8 @@ create table replication_job (
|
||||
update_time timestamp default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
INDEX policy (policy_id),
|
||||
INDEX poid_uptime (policy_id, update_time)
|
||||
INDEX poid_uptime (policy_id, update_time),
|
||||
INDEX poid_status (policy_id, status)
|
||||
);
|
||||
|
||||
create table replication_immediate_trigger (
|
||||
@ -223,7 +224,11 @@ create table img_scan_job (
|
||||
job_uuid varchar(64),
|
||||
creation_time timestamp default CURRENT_TIMESTAMP,
|
||||
update_time timestamp default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (id)
|
||||
PRIMARY KEY (id),
|
||||
INDEX idx_status (status),
|
||||
INDEX idx_digest (digest),
|
||||
INDEX idx_uuid (job_uuid),
|
||||
INDEX idx_repository_tag (repository,tag)
|
||||
);
|
||||
|
||||
create table img_scan_overview (
|
||||
@ -298,4 +303,4 @@ CREATE TABLE IF NOT EXISTS `alembic_version` (
|
||||
`version_num` varchar(32) NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
insert into alembic_version values ('1.4.0');
|
||||
insert into alembic_version values ('1.5.0');
|
||||
|
@ -290,5 +290,5 @@ create table alembic_version (
|
||||
version_num varchar(32) NOT NULL
|
||||
);
|
||||
|
||||
insert into alembic_version values ('1.4.0');
|
||||
insert into alembic_version values ('1.5.0');
|
||||
|
||||
|
@ -20,7 +20,7 @@ import (
|
||||
|
||||
const (
|
||||
// SchemaVersion is the version of database schema
|
||||
SchemaVersion = "1.4.0"
|
||||
SchemaVersion = "1.5.0"
|
||||
)
|
||||
|
||||
// GetSchemaVersion return the version of database schema
|
||||
|
@ -73,3 +73,5 @@ Changelog for harbor database schema
|
||||
- create table `user_group`
|
||||
- modify table `project_member` use `id` as PK and add column `entity_type` to indicate if the member is user or group.
|
||||
- add `job_uuid` column to `replication_job` and `img_scan_job`
|
||||
- add index `poid_status` in table replication_job
|
||||
- add index `idx_status`, `idx_status`, `idx_digest`, `idx_repository_tag` in table img_scan_job
|
||||
|
Loading…
Reference in New Issue
Block a user