#826·migrate

Incompatibility with postgres 15

Author: flaviu2001Created Oct 17, 2022Updated Sep 23, 2026

Describe the Bug Using the migrate tool with the newest docker image postgres:15 fails when running the command below

migrate -database "postgres://${NEW_PGUSER}:${NEW_PGPASSWORD}@${PGHOST}:${PGPORT}/${NEW_PGDATABASE}?sslmode=disable" -path scripts up

with the error

pq: permission denied for schema public in line 0: CREATE TABLE IF NOT EXISTS "public"."schema_migrations" (version bigint not null primary key, dirty boolean not null)

The issue is fixed by reverting to postgres:14.5

Steps to Reproduce Steps to reproduce the behavior:

  1. My migrations look like: not relevant
  2. I ran migrate with the following options: see command above
  3. See error: see above

Expected Behavior Scripts run without error. The database was empty beforehand, migrate in this case is simply used to run the create table queries in integration testing.

Migrate Version v.4.15.2

Loaded Source Drivers Source drivers: file

Loaded Database Drivers Database drivers: postgres, postgresql, stub

Go Version 1.18

Stacktrace No stacktrace available.

Additional context None