Reputation: 51
I tried to migrate mysql data to postgres. All works fine but when I see the datetime fields in postgres are 5 hours behind mysql. How can I do to disable whatever pgloader is doing?
Thanks
I'm using this command
pgloader mysql://root:root@mysql57/database1 postgresql://postgres@localhost/database2
Upvotes: 2
Views: 826
Reputation: 51
I found the answer. You have to create a file (could be info.load) like this:
LOAD DATABASE
FROM mysql://root:root@mysql57/database1
INTO postgresql://postgres@localhost/database2
CAST type datetime to timestamp drop default drop not null using zero-dates-to-null;
then use the command
pgloader info.load
In that way, pgloader keeps the same datetime from mysql
Upvotes: 1