Created
December 2, 2017 11:43
-
-
Save gjergjsheldija/d4e5ade2f1f36553f69b08815716c79b to your computer and use it in GitHub Desktop.
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:root@localhost/siis | |
INTO postgresql://postgres:postgres@localhost/siis_prodhim | |
WITH include drop, create tables, create indexes, reset sequences, foreign keys, preserve index names | |
SET maintenance_work_mem to '128MB', | |
work_mem to '12MB', | |
search_path to 'public' | |
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 timestamp to timestamptz drop default drop not null using zero-dates-to-null, | |
-- column care_address_citytown.is_village to siis.care_address_citytown_is_village, | |
-- column care_billing_bill_item.bill_item_status to siis.care_billing_bill_item_bill_item_status, | |
type tinyint to int drop typemod | |
-- type tinyint to boolean using tinyint-to-boolean, | |
-- type year to integer | |
-- MATERIALIZE VIEWS data_history_changes, medicament_chart | |
MATERIALIZE ALL VIEWS | |
-- INCLUDING ONLY TABLE NAMES MATCHING ~/film/, 'actor' | |
-- EXCLUDING TABLE NAMES MATCHING ~<ory> | |
-- DECODING TABLE NAMES MATCHING ~/messed/, ~/encoding/ AS utf8 | |
BEFORE LOAD DO | |
$$ CREATE SCHEMA IF NOT EXISTS public; $$ | |
-- $$ DROP TYPE IF EXISTS siis.care_address_citytown_is_village CASCADE; $$, | |
-- $$ CREATE TYPE siis.care_address_citytown_is_village AS ENUM('0','1'); $$, | |
-- $$ DROP TYPE IF EXISTS siis.care_billing_bill_item_bill_item_status CASCADE; $$, | |
-- $$ CREATE TYPE siis.care_billing_bill_item_bill_item_status AS ENUM ('0', '1'); $$; | |
; | |
-- pgloader-master/build/bin/pgloader pgloader.load |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment