
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
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) {
|
|
+ ormConfig.extra = { socketPath: config.mysql.socketPath };
|
|
+ } 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?: {
|
|
- host: string;
|
|
+ host?: string;
|
|
user: string;
|
|
- port: number;
|
|
+ port?: number;
|
|
password: string;
|
|
database: string;
|
|
charset?: string;
|
|
+ socketPath?: string;
|
|
};
|
|
postgres?: {
|
|
host: string;
|