-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathload_data.load
More file actions
29 lines (25 loc) · 1.03 KB
/
load_data.load
File metadata and controls
29 lines (25 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
LOAD DATABASE
FROM mysql://root@localhost/volunteers
INTO postgresql://postgres:postgres@localhost:5432/postgres
WITH include drop, create tables, create indexes, reset sequences
SET work_mem to '256MB',
maintenance_work_mem to '512 MB'
CAST type datetime to timestamp drop default drop not null,
type date to date drop not null,
type tinyint to smallint drop not null,
type int to int drop not null,
type bigint to bigint drop not null,
type double to double precision drop not null,
type float to real drop not null,
type text to text drop not null,
type varchar to varchar drop not null,
type char to char drop not null,
type blob to bytea drop not null,
type longtext to text drop not null,
type mediumtext to text drop not null,
type tinytext to text drop not null,
type longblob to bytea drop not null,
type mediumblob to bytea drop not null,
type tinyblob to bytea drop not null
BEFORE LOAD DO
$$ CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; $$;