pgloader/test/mysql/f1db-data.load
Dimitri Fontaine 7b08b6e3d3 Refrain from creating tables in “data only” operations.
We forgot that rule in the case of creating the target tables for the
materializing views commands, which led to surprising and wrong behavior.

Fix #721, and add a new test case while at it.
2018-01-25 23:32:31 +01:00

22 lines
540 B
Fish

load database
from mysql://root@localhost/f1db
into pgsql:///plop
-- with data only, truncate
WITH disable triggers, data only, no truncate,
include no drop, create no tables, create indexes,
reset sequences, no foreign keys,
downcase identifiers, uniquify index names
excluding table names matching ~/./
materialize views circuit as
$$
select circuitid, circuitref, name, location, country,
concat('(', lng, ',', lat, ')') as position,
alt, url
from circuits;
$$;