From 17b0f834f4885569027e3c5a8074aa86f0da2362 Mon Sep 17 00:00:00 2001 From: howeye <360782885@qq.com> Date: Wed, 11 Dec 2019 20:50:09 +0800 Subject: [PATCH] Fix bug of rename tables --- .../webank/wedatasphere/qualitis/entity/Role.java | 2 +- .../webank/wedatasphere/qualitis/entity/User.java | 4 ++-- gradle.properties | 2 +- web/app/src/main/resources/database/init.sql | 12 ++++++------ .../resources/database/update/update_0.5.0-0.6.0.sql | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/Role.java b/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/Role.java index d156e91e..e0445d20 100644 --- a/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/Role.java +++ b/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/Role.java @@ -35,7 +35,7 @@ public class Role { private String name; @ManyToMany(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER) - @JoinTable(name = "auth_role_permission", + @JoinTable(name = "qualitis_auth_role_permission", joinColumns = {@JoinColumn(name="role_id", referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "permission_id", referencedColumnName = "id")}) private List permissions; diff --git a/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/User.java b/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/User.java index 5a35d475..daffa40c 100644 --- a/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/User.java +++ b/core/user/src/main/java/com/webank/wedatasphere/qualitis/entity/User.java @@ -51,7 +51,7 @@ public class User { private String department; @ManyToMany(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER) - @JoinTable(name = "auth_user_role", + @JoinTable(name = "qualitis_auth_user_role", joinColumns = {@JoinColumn(name="user_id", referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "role_id", referencedColumnName = "id")}) private Set roles; @@ -63,7 +63,7 @@ public class User { private List userSpecPermissions; @ManyToMany(cascade = {CascadeType.ALL}, fetch = FetchType.EAGER) - @JoinTable(name = "auth_user_permission", + @JoinTable(name = "qualitis_auth_user_permission", joinColumns = {@JoinColumn(name="user_id", referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "permission_id", referencedColumnName = "id")}) private Set specPermissions; diff --git a/gradle.properties b/gradle.properties index 0915e5c6..c7c657f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,4 @@ # group=com.webank.wedatasphere.qualitis -version=0.5.0 \ No newline at end of file +version=0.6.0 \ No newline at end of file diff --git a/web/app/src/main/resources/database/init.sql b/web/app/src/main/resources/database/init.sql index 6e80b21c..8f538375 100644 --- a/web/app/src/main/resources/database/init.sql +++ b/web/app/src/main/resources/database/init.sql @@ -4,8 +4,8 @@ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for auth_role_permission -- ---------------------------- -DROP TABLE IF EXISTS `auth_role_permission`; -CREATE TABLE `auth_role_permission` ( +DROP TABLE IF EXISTS `qualitis_auth_role_permission`; +CREATE TABLE `qualitis_auth_role_permission` ( `role_id` bigint(20) NOT NULL, `permission_id` bigint(20) NOT NULL, KEY `FK5mgu2qwy6vgke5w8ds63it2ni` (`permission_id`), @@ -17,8 +17,8 @@ CREATE TABLE `auth_role_permission` ( -- ---------------------------- -- Table structure for auth_user_permission -- ---------------------------- -DROP TABLE IF EXISTS `auth_user_permission`; -CREATE TABLE `auth_user_permission` ( +DROP TABLE IF EXISTS `qualitis_auth_user_permission`; +CREATE TABLE `qualitis_auth_user_permission` ( `user_id` bigint(20) NOT NULL, `permission_id` bigint(20) NOT NULL, PRIMARY KEY (`user_id`,`permission_id`), @@ -30,8 +30,8 @@ CREATE TABLE `auth_user_permission` ( -- ---------------------------- -- Table structure for auth_user_role -- ---------------------------- -DROP TABLE IF EXISTS `auth_user_role`; -CREATE TABLE `auth_user_role` ( +DROP TABLE IF EXISTS `qualitis_auth_user_role`; +CREATE TABLE `qualitis_auth_user_role` ( `user_id` bigint(20) NOT NULL, `role_id` bigint(20) NOT NULL, PRIMARY KEY (`user_id`,`role_id`), diff --git a/web/app/src/main/resources/database/update/update_0.5.0-0.6.0.sql b/web/app/src/main/resources/database/update/update_0.5.0-0.6.0.sql index 6236c010..c758533b 100644 --- a/web/app/src/main/resources/database/update/update_0.5.0-0.6.0.sql +++ b/web/app/src/main/resources/database/update/update_0.5.0-0.6.0.sql @@ -12,7 +12,7 @@ ALTER TABLE rule_datasource_mapping RENAME TO qualitis_rule_datasource_mapping; ALTER TABLE rule_group RENAME TO qualitis_rule_group; ALTER TABLE rule_variable RENAME TO qualitis_rule_variable; ALTER TABLE template RENAME TO qualitis_template; -ALTER TABLE template_mid_TABLE_input_meta RENAME TO qualitis_template_mid_TABLE_input_meta; +ALTER TABLE template_mid_table_input_meta RENAME TO qualitis_template_mid_table_input_meta; ALTER TABLE template_output_meta RENAME TO qualitis_template_output_meta; ALTER TABLE template_regexp_expr RENAME TO qualitis_template_regexp_expr; ALTER TABLE template_statistic_input_meta RENAME TO qualitis_template_statistic_input_meta;