mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-07 10:57:11 +08:00
fix: 修复 PostgreSQL JDBC URL 配置及部分 SQL 语法错误 (#178)
This commit is contained in:
@@ -8,7 +8,7 @@ spring.datasource:
|
||||
password: ${DB_PWD:123456}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# # PostgreSQL 配置
|
||||
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&stringtype=unspecified
|
||||
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin_job}?options=-c%20TimeZone=Asia/Shanghai&sslmode=prefer&channelBinding=require&stringtype=unspecified
|
||||
# username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:123456}
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
|
@@ -8,7 +8,7 @@ spring.datasource:
|
||||
password: ${DB_PWD:123456}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# # PostgreSQL 配置
|
||||
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin_job}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&stringtype=unspecified
|
||||
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin_job}?options=-c%20TimeZone=Asia/Shanghai&sslmode=prefer&channelBinding=require&stringtype=unspecified
|
||||
# username: ${DB_USER:root}
|
||||
# password: ${DB_PWD:123456}
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
|
@@ -17,7 +17,7 @@ spring.datasource:
|
||||
password: ${DB_PWD:123456}
|
||||
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||
# # PostgreSQL 配置
|
||||
# url: jdbc:p6spy:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&stringtype=unspecified
|
||||
# url: jdbc:p6spy:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?options=-c%20TimeZone=Asia/Shanghai&sslmode=prefer&channelBinding=require&stringtype=unspecified
|
||||
# username: ${DB_USER:postgres}
|
||||
# password: ${DB_PWD:123456}
|
||||
# driver-class-name: com.p6spy.engine.spy.P6SpyDriver
|
||||
|
@@ -19,7 +19,7 @@ spring.datasource:
|
||||
password: ${DB_PWD:123456}
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# # PostgreSQL 配置
|
||||
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?serverTimezone=Asia/Shanghai&useSSL=true&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&autoReconnect=true&stringtype=unspecified
|
||||
# url: jdbc:postgresql://${DB_HOST:127.0.0.1}:${DB_PORT:5432}/${DB_NAME:continew_admin}?options=-c%20TimeZone=Asia/Shanghai&sslmode=prefer&channelBinding=require&stringtype=unspecified
|
||||
# username: ${DB_USER:postgres}
|
||||
# password: ${DB_PWD:123456}
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
|
@@ -137,22 +137,19 @@ COMMENT ON COLUMN "sys_app"."tenant_id" IS '租户ID';
|
||||
CREATE INDEX "idx_app_tenant_id" ON "sys_app" ("tenant_id");
|
||||
|
||||
-- 调整唯一索引
|
||||
ALTER TABLE "sys_dept" DROP INDEX "uk_dept_name_parent_id";
|
||||
DROP INDEX IF EXISTS "uk_dept_name_parent_id";
|
||||
CREATE UNIQUE INDEX "uk_dept_name_parent_id" ON "sys_dept" ("name", "parent_id", "tenant_id");
|
||||
|
||||
ALTER TABLE "sys_role" DROP INDEX "uk_role_name";
|
||||
ALTER TABLE "sys_role" DROP INDEX "uk_role_code";
|
||||
DROP INDEX IF EXISTS "uk_role_name", "uk_role_code";
|
||||
CREATE UNIQUE INDEX "uk_role_name" ON "sys_role" ("name", "tenant_id");
|
||||
CREATE UNIQUE INDEX "uk_role_code" ON "sys_role" ("code", "tenant_id");
|
||||
|
||||
ALTER TABLE "sys_user" DROP INDEX "uk_user_username";
|
||||
ALTER TABLE "sys_user" DROP INDEX "uk_user_email";
|
||||
ALTER TABLE "sys_user" DROP INDEX "uk_user_phone";
|
||||
DROP INDEX IF EXISTS "uk_user_username", "uk_user_email", "uk_user_phone";
|
||||
CREATE UNIQUE INDEX "uk_user_username" ON "sys_user" ("username", "tenant_id");
|
||||
CREATE UNIQUE INDEX "uk_user_email" ON "sys_user" ("email", "tenant_id");
|
||||
CREATE UNIQUE INDEX "uk_user_phone" ON "sys_user" ("phone", "tenant_id");
|
||||
|
||||
ALTER TABLE "sys_app" DROP INDEX "uk_app_access_key";
|
||||
DROP INDEX IF EXISTS "uk_app_access_key";
|
||||
CREATE UNIQUE INDEX "uk_app_access_key" ON "sys_app" ("access_key", "tenant_id");
|
||||
|
||||
-- 初始化默认菜单
|
||||
|
Reference in New Issue
Block a user