2022-03-30 09:31:56 +00:00
|
|
|
diff --git a/ormconfig.js b/ormconfig.js
|
|
|
|
index 5591853b..838c06cb 100644
|
|
|
|
--- a/ormconfig.js
|
|
|
|
+++ b/ormconfig.js
|
|
|
|
@@ -38,8 +38,6 @@ switch (config.dbtype) {
|
|
|
|
|
|
|
|
case 'mysql':
|
|
|
|
ormConfig.type = 'mysql';
|
|
|
|
- ormConfig.host = config.mysql.host;
|
|
|
|
- ormConfig.port = config.mysql.port;
|
|
|
|
ormConfig.username = config.mysql.user;
|
|
|
|
ormConfig.password = config.mysql.password;
|
|
|
|
ormConfig.database = config.mysql.database;
|
|
|
|
@@ -49,6 +47,12 @@ switch (config.dbtype) {
|
|
|
|
} else {
|
|
|
|
ormConfig.charset = config.mysql.charset;
|
|
|
|
}
|
|
|
|
+ if (config.mysql.socketPath) {
|
2023-05-24 13:37:59 +00:00
|
|
|
+ ormConfig.extra = { socketPath: config.mysql.socketPath };
|
2022-03-30 09:31:56 +00:00
|
|
|
+ } else {
|
|
|
|
+ ormConfig.host = config.mysql.host;
|
|
|
|
+ ormConfig.port = config.mysql.port;
|
|
|
|
+ }
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'postgres':
|
|
|
|
diff --git a/src/model/IConfigFile.ts b/src/model/IConfigFile.ts
|
|
|
|
index 6a502e83..ba84a423 100644
|
|
|
|
--- a/src/model/IConfigFile.ts
|
|
|
|
+++ b/src/model/IConfigFile.ts
|
|
|
|
@@ -61,12 +61,13 @@ export default interface IConfigFile {
|
|
|
|
regexp?: boolean;
|
|
|
|
};
|
|
|
|
mysql?: {
|
2020-09-25 04:45:31 +00:00
|
|
|
- host: string;
|
|
|
|
+ host?: string;
|
|
|
|
user: string;
|
2022-03-30 09:31:56 +00:00
|
|
|
- port: number;
|
|
|
|
+ port?: number;
|
|
|
|
password: string;
|
2020-09-25 04:45:31 +00:00
|
|
|
database: string;
|
2022-03-30 09:31:56 +00:00
|
|
|
charset?: string;
|
|
|
|
+ socketPath?: string;
|
|
|
|
};
|
|
|
|
postgres?: {
|
|
|
|
host: string;
|