dalibo / sqlserver2pgsql

Migration tool to convert a Microsoft SQL Server Database into a PostgreSQL database, as automatically as possible
http://dalibo.github.io/sqlserver2pgsql
GNU General Public License v3.0
515 stars 117 forks source link

I migrate AspNetCore.Identity tables to postgres but all tables were migrated lowercase #50

Closed senzacionale closed 7 years ago

senzacionale commented 8 years ago

For example:

AspNetUsersis original table name

after migrations is name aspnetusers. Same is with table fields

How can I migrate it with original upper case

marco44 commented 8 years ago

Hi,

sqlserver2pgsql doesn't do it. It's an extremely bad idea, you'll need to double quote all objets name in all your queries if you create objects names like that in PostgreSQL.

If you create your objects with lower case names, you can still use CamelCase in your queries: lower case names are «case insensitive» in PostgreSQL: as long as you don't use double quotes around object names, they are all lower cased when the parser searchs them in the database catalog.

If you really, absolutely need it, it shouldn't be very hard to add to sqlserver2pgsql. Patches are welcome :)

marco44 commented 7 years ago

Wow, I just realized, there is already an option for this… -keep_identifier_case.

Sorry about that, I feel really dumb :)