pgflow 0.7.1: Fix pgmq 1.5.1 Version Conflict on New Supabase Projects
pgflow 0.7.1 fixes installation failures on fresh Supabase projects caused by pgmq version mismatch.
The Bug
Section titled “The Bug”Installing pgflow on new Supabase projects failed with:
ERROR: extension "pgmq" has no installation script nor update path for version "1.4.4" (SQLSTATE 22023)At statement: 2CREATE EXTENSION IF NOT EXISTS "pgmq" WITH SCHEMA "pgmq" VERSION "1.4.4"Why It Happened
Section titled “Why It Happened”Supabase upgraded to pgmq 1.5.1 in Postgres 17.6.1.016+ (supabase/postgres#1668). pgflow’s initial migration was pinned to version 1.4.4, which no longer exists in new Supabase instances.
The Fix
Section titled “The Fix”Removed the version constraint from pgmq extension creation. pgflow now uses whatever pgmq version Supabase provides (1.4.4, 1.5.1, or newer).
CREATE EXTENSION IF NOT EXISTS "pgmq" WITH SCHEMA "pgmq" VERSION "1.4.4";CREATE EXTENSION IF NOT EXISTS "pgmq" WITH SCHEMA "pgmq";Credits
Section titled “Credits”Thanks to @kallebysantos for reporting this issue!