mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-27 17:21:58 +01:00
Merge pull request #2282 from ywk253100/170510_foreignkey
Delete foreign key
This commit is contained in:
commit
16b77de90e
@ -107,8 +107,7 @@ create table access_log (
|
||||
operation varchar(20) NOT NULL,
|
||||
op_time timestamp,
|
||||
primary key (log_id),
|
||||
INDEX pid_optime (project_id, op_time),
|
||||
FOREIGN KEY (project_id) REFERENCES project (project_id)
|
||||
INDEX pid_optime (project_id, op_time)
|
||||
);
|
||||
|
||||
create table repository (
|
||||
|
@ -102,8 +102,7 @@ create table access_log (
|
||||
repo_tag varchar (128),
|
||||
GUID varchar(64),
|
||||
operation varchar(20) NOT NULL,
|
||||
op_time timestamp,
|
||||
FOREIGN KEY (project_id) REFERENCES project (project_id)
|
||||
op_time timestamp
|
||||
);
|
||||
|
||||
CREATE INDEX pid_optime ON access_log (project_id, op_time);
|
||||
@ -117,7 +116,6 @@ create table repository (
|
||||
star_count int DEFAULT 0 NOT NULL,
|
||||
creation_time timestamp default CURRENT_TIMESTAMP,
|
||||
update_time timestamp default CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (project_id) REFERENCES project(project_id),
|
||||
UNIQUE (name)
|
||||
);
|
||||
|
||||
|
@ -43,4 +43,5 @@ Changelog for harbor database schema
|
||||
- delete column `owner_id` from table `repository`
|
||||
- delete column `user_id` from table `access_log`
|
||||
- delete foreign key (user_id) references user(user_id)from table `access_log`
|
||||
- delete foreign key (project_id) references project(project_id)from table `access_log`
|
||||
- add column `username` varchar (32) to table `access_log`
|
Loading…
Reference in New Issue
Block a user