From 50d8841d69f68cccab92c36612ce5e7247c01b63 Mon Sep 17 00:00:00 2001 From: saga92 Date: Tue, 17 May 2016 14:01:38 +0800 Subject: [PATCH 1/6] add db schema changelog --- migration/changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 migration/changelog.md diff --git a/migration/changelog.md b/migration/changelog.md new file mode 100644 index 000000000..3baa95f14 --- /dev/null +++ b/migration/changelog.md @@ -0,0 +1,6 @@ +# What's New in Harbor Database Schema +Changelog for harbor database schema + +## 0.1.0 + +## 0.1.1 From 66b6c9d888bc95829b856523cb784fad61f1fb82 Mon Sep 17 00:00:00 2001 From: saga92 Date: Tue, 17 May 2016 14:33:56 +0800 Subject: [PATCH 2/6] Update changelog.md --- migration/changelog.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/migration/changelog.md b/migration/changelog.md index 3baa95f14..413032985 100644 --- a/migration/changelog.md +++ b/migration/changelog.md @@ -4,3 +4,13 @@ Changelog for harbor database schema ## 0.1.0 ## 0.1.1 + + - add column `creation_time` to table `user` + - add column `sysadmin_flag` to table `user` + - add column `update_time` to table `user` + - add column `role_mask` to table `role` + - drop table `user_project_role` + - drop table `project_role` + - delete data `sysadmin` from table `role` + - delete data `M` from table `access` + - add column `update_time` to table `project` From d4ebe33907e7ec68e9dfbeea8279fbbc84702c1c Mon Sep 17 00:00:00 2001 From: saga92 Date: Wed, 18 May 2016 10:57:47 +0800 Subject: [PATCH 3/6] change comment --- migration/migration_harbor/versions/0_1_1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration_harbor/versions/0_1_1.py b/migration/migration_harbor/versions/0_1_1.py index 746446f39..ecec2cfb3 100644 --- a/migration/migration_harbor/versions/0_1_1.py +++ b/migration/migration_harbor/versions/0_1_1.py @@ -83,7 +83,7 @@ def upgrade(): session.delete(role) session.query(Role).update({Role.role_id: Role.role_id - 1}) - #delete M from table access + #delete A from table access acc = session.query(Access).filter_by(access_id=1).first() session.delete(acc) session.query(Access).update({Access.access_id: Access.access_id - 1}) From 97b7690cb77a8b8c62c9ea61b6b476907d2e0b36 Mon Sep 17 00:00:00 2001 From: saga92 Date: Wed, 18 May 2016 11:00:32 +0800 Subject: [PATCH 4/6] Update changelog.md --- migration/changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/changelog.md b/migration/changelog.md index 413032985..e275f8ac6 100644 --- a/migration/changelog.md +++ b/migration/changelog.md @@ -5,9 +5,11 @@ Changelog for harbor database schema ## 0.1.1 + - create table `schema_version` - add column `creation_time` to table `user` - add column `sysadmin_flag` to table `user` - add column `update_time` to table `user` + - create table `project_member` - add column `role_mask` to table `role` - drop table `user_project_role` - drop table `project_role` From 04d8fe87e69e317c16680d123590a1a5884fb666 Mon Sep 17 00:00:00 2001 From: saga92 Date: Wed, 18 May 2016 11:02:53 +0800 Subject: [PATCH 5/6] Update changelog.md --- migration/changelog.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/migration/changelog.md b/migration/changelog.md index e275f8ac6..bb800e900 100644 --- a/migration/changelog.md +++ b/migration/changelog.md @@ -5,14 +5,15 @@ Changelog for harbor database schema ## 0.1.1 + - create table `project_member` - create table `schema_version` + - drop table `user_project_role` + - drop table `project_role` - add column `creation_time` to table `user` - add column `sysadmin_flag` to table `user` - add column `update_time` to table `user` - - create table `project_member` - add column `role_mask` to table `role` - - drop table `user_project_role` - - drop table `project_role` - - delete data `sysadmin` from table `role` - - delete data `M` from table `access` - add column `update_time` to table `project` + - delete data `sysadmin` from table `role` + - delete data `A` from table `access` + From 0f73f1e3765fb6f1f13c0776908e290dc2062f41 Mon Sep 17 00:00:00 2001 From: saga92 Date: Wed, 18 May 2016 14:47:57 +0800 Subject: [PATCH 6/6] Update changelog.md --- migration/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/changelog.md b/migration/changelog.md index bb800e900..ab14c17d5 100644 --- a/migration/changelog.md +++ b/migration/changelog.md @@ -14,6 +14,6 @@ Changelog for harbor database schema - add column `update_time` to table `user` - add column `role_mask` to table `role` - add column `update_time` to table `project` - - delete data `sysadmin` from table `role` + - delete data `AMDRWS` from table `role` - delete data `A` from table `access`