Migrate2Postgres
Migrate2Postgres copied to clipboard
SCHEMA in uppercase
Hi
Thank you for this wonderful tool.
I have a huge db with camelcase tables - would love to see support for this as well since changing it now is not an option.
Thanks
The only way to maintain the CaSe in Postgres is by using quotes, e.g.
CREATE TABLE "Users";
But that means that every time you reference that object you need to use quotes with the exact same CaSe, so this will error as no such table:
-- error, would not work
SELECT * FROM users;
-- error, would not work, even though case is correct
SELECT * FROM Users;
The only way to use it would be to add quotes and the correct case every time:
-- correct CaSe and quotes works
SELECT * FROM "Users";
I can add that feature, but I find this to be unusable. If more people will request it then I will reconsider.
You can keep the schema casing unchanged. Simply do not specify any transformation. It will work as the SQL standard is case-insensitive.
The only thing you wouldn't get is the original case in your result sets. All the columns will collapse to lowercase.
Thank you for this answer - I have problem transfering records - it expects schema with lowercase. I'll dig futher to find another solution. Luckily I have another similar db transfer project that has proper casing - will try this with that one.