~vazir


#72 Postgresql migration exception, if former SQL contains empty search path set 4 years ago

Ticket created by ~vazir on ~olly/yoyo

postgresql pg_dump creates dumps with search path set to '', like this:

SELECT pg_catalog.set_config('search_path', '', false);

which leads to the following exception:

psycopg2.errors.UndefinedTable: relation "_yoyo_log" does not exist LINE 1: INSERT INTO "_yoyo_log" (id, migration_hash, migration_id, o...

You (presumably) do not define explicitly the schema 'public', relying on the defaults. To fix this exception, the tables yoyo_*., while used with postgresql, must be fully defined with the schema like public.yoyo_... or the schema must have a configuration parameter in the config file.

PS. source hut sucks.