I got postgis to deploy with a flag not included in fly help pg create
, that was mentioned in a github issue:
fly pg create --image-ref flyio/postgres:14
However, now I get a permission error when my application tries to run the migrations:
15:36:06.676 [info] execute "CREATE EXTENSION IF NOT EXISTS postgis"
** (Postgrex.Error) ERROR 42501 (insufficient_privilege) permission denied to create extension "postgis"
hint: Must be superuser to create this extension.
So I needed to switch the DATABASE_URL
that was set for me when running fly postgres attach
.