I tried exporting the data to CSV and importing it to the new database, but it does not seem to respect the case sensitivity of column names. "createdAt" becomes "createdat" and does not change even when trying to modify the table. How do I do it correctly?
You can use the "dump" and "restore" feature of datagrip which uses pg_dump
and pg_restore
behind the scenes, this will respect the case-sensitivity of the column names.
Here are the steps:
Export with 'pg_dump'
option, this will export the dump to selected destination. Make sure you add ".dump" as the destination file extension.
Restore...
option, selected the file that you exported in step 1.Note: If the path to pg_dump
or pg_restore
is invalid, you can use the "which" command in your terminal and get the correct path from there.