Created
November 12, 2013 11:43
-
-
Save zoglesby/7429537 to your computer and use it in GitHub Desktop.
pgloader example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOAD DATABASE | |
FROM mysql://root@localhost/sakila | |
INTO postgresql://localhost:54393/sakila | |
WITH include drop, create tables, no truncate, | |
create indexes, reset sequences, foreign keys | |
SET maintenance_work_mem to '128MB', work_mem to '12MB', | |
search_path to 'sakila' /* migrate to a specific schema */ | |
CAST type datetime to timestamptz | |
drop default drop not null using zero-dates-to-null, | |
type date drop not null drop default using zero-dates-to-null, | |
type year to integer | |
BEFORE LOAD DO | |
$$ create schema if not exists sakila; $$; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thx for this, pgloader is so poorly documented.
Nothing helps like a good set of examples.