mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 07:16:58 +02:00
At the moment it's a very manual process, and it might get automated someday. Meanwhile it's still useful to have. See #569 for an issue that got a test case added.
20 lines
561 B
Fish
20 lines
561 B
Fish
load database
|
|
-- from mysql://root@localhost/pgloader
|
|
from mysql://root@unix:/tmp/mysql.sock:3306/pgloader
|
|
into postgresql:///pgloader
|
|
|
|
WITH concurrency = 2,
|
|
multiple readers per thread,
|
|
rows per range = 50000
|
|
|
|
ALTER SCHEMA 'pgloader' RENAME TO 'mysql'
|
|
|
|
CAST column utilisateurs__Yvelines2013-06-28.sexe
|
|
to text drop not null using empty-string-to-null,
|
|
|
|
column base64.id to uuid drop typemod,
|
|
column base64.data to jsonb using base64-decode
|
|
|
|
BEFORE LOAD DO $$ create schema if not exists mysql; $$;
|
|
|