pgloader/test/sqlite-chinook.load
Dimitri Fontaine fe3601b04c Fix SQLite index support, add foreign keys support.
It turns out recent changes broke tne SQLite index support (from adding
support for MS SQL partial/filtered indexes), so fix it by using the
pgsql-index structure rather than the specific sqlite-idx one.

In passing, improve detection of PRIMARY KEY indexes, which was still
lacking. This work showed that the introspection done by pgloader was
wrong, it's way more crazy that we though, so adjust the code to loop
over PRAGMA calls for each object we inspect.

While adding PRAGMA calls, add support for foreign keys too, we have the
code infrastructure that makes it easy now.
2016-03-27 20:39:13 +02:00

11 lines
337 B
Fish

load database
from 'sqlite/Chinook_Sqlite_AutoIncrementPKs.sqlite'
into postgresql:///pgloader
-- including only table names like 'Invoice%'
with workers = 4,
concurrency = 2,
include drop, create tables, create indexes, reset sequences, foreign keys
set work_mem to '16MB', maintenance_work_mem to '512 MB';