migrate
migrate copied to clipboard
Migration rolled back
Describe the Bug
When search_path
doesn't contain public
upon completion of migrations script, migrations fails - but the changes are not rolled back (output below)
Steps to Reproduce Steps to reproduce the behaviour:
- Create
up
script, that would modify the search path - e.g.:
create schema foo;
set search_path to foo;
CREATE TABLE bar(
baz INTEGER NOT NULL,
primary key(baz)
);
- run
migrate up
to include ^^ - See error
Expected Behavior Migration should be rolled back when any error occurs
Migrate Version
v4.15.1
Obtained by running: migrate -version
Loaded Source Drivers file
Loaded Database Drivers postgres
Go Version go version go1.17.6 darwin/arm64
Stacktrace N/A
Additional context
./script/migrate
2022/03/28 09:46:43 Start buffering 5/u test
2022/03/28 09:46:43 Read and execute 5/u test
2022/03/28 09:46:43 error: pq: relation "schema_migrations" does not exist in line 0: TRUNCATE "schema_migrations"
ERROR: 1