-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
forcing postgresql column names to lowercase #121
Comments
Did you see #106? That seems to do what you're looking for, albeit undocumented. |
Interesting. I remember making a half-hearted attempt to use that, but I eventually found it easier to hack the code and not use extraConfig. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For my story, the schemas for both the (source) MySQL and (final target) PostgreSQL databases are defined by third-party software.
The two schemas are generally compatible, but the MySQL schema uses uppercase column names, and the final target PostgreSQL schema uses lowercase column names.
Due to other minor PostgreSQL schema discrepancies, I'm first using NMIG to migrate the MySQL data into a NMIG target PostgreSQL database and then using pg_dump --data-only to extract data that can be loaded into the (final target) PostgreSQL database.
The extract-and-load process using pg_dump doesn't work when the NMIG target PostgreSQL database has uppercase column names (because the final target PostgreSQL database has lowercase column names).
To get past this problem, I made a one-line change to ExtraConfigProcessor.ts, modifying the getColumnName function to force all column names in the NMIG target PostgreSQL database to lowercase.
This hack was enough to solve my problem. Not sure if this story is unusual, or whether it might make sense to think about adding a general NMIG configuration setting to force lowercase column names in the target db.
The text was updated successfully, but these errors were encountered: