mysql - How to define a default value for a column after a cast in a pgloader script? -


let's i'm migrating mysql database postgresql pgloader, using default sample on official website:

load database             mysql://root@localhost/sakila        postgresql:///sakila     include drop, create tables, no truncate,         create indexes, reset sequences, foreign keys      set maintenance_work_mem '128mb', work_mem '12mb', search_path 'sakila'     cast type datetime timestamptz                   drop default drop not null using zero-dates-to-null,         type date drop not null drop default using zero-dates-to-null     materialize views film_list, staff_list     -- including table names matching ~/film/, 'actor'    -- excluding table names matching ~<ory>     before load    $$ create schema if not exists sakila; $$; 

let's assume in table 'foo', have column 'bar' datetime type, , want set new default value of '2015-01-01 00:00:00' when migrate postgresql (the old default value in mysql '0000-00-00 00:00:00')

how can define in pgloader migration script? tried following line after cast keyword, throwing error right here:

column foo.bar timestamp set default "2015-01-01 00:00:00",                                         ^ (could not parse whitespace) 

and couldn't find default values in reference docs.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -