Blocker - Postgis db versions mismatch - deployment fails

Dev is running PostGIS 3.5.x while prod is on 3.3.x. During deploy, migrations attempt to alter spatial_ref_sys (a PostGIS-owned table), which fails in prod due to missing upgrade paths and lack of table ownership.
This blocks production deployments.
Overwriting (copying) production db does not fix the issue as postgis versions persist.

Also tried excluding PostGIS tables/schemas in Drizzle, but Replit ignores those rules, so spatial_ref_sys still attempts to alter those tables.

Several tickets opened and merged into #276697

To reproduce:

  1. add postgis extension on db.
  2. Deploy.
  3. Any subsequent deployments will prompt to either: A) Overwrite production B) Cancel

@FranciscoCM maybe flag this up? Sounds sticky and possibly platform-side.

1 Like

Thanks @realfunnyeric I´ve been stuck for a week, easy to reproduce. Im software engineer myself. Seems 100% platform related. No workaround posible, besides dumping production db on each relase.

Hi @FranciscoCM or @realfunnyeric would you have any idea wether this will be resolved anytime soon, or an estimate?

I have spent nearly 1k on this project and I have wiped production database like 10 times. It is not an option anymore.

Also I havent received any technical support so far. All I know is it was escalated but this was nearly 2 weeks ago.

Thanks

Hey @cmarradesc so sorry to hear about the issues you are having here!
Can you please share a ticket number with me? With that I can further flag internally!

Hi , thanks Frandisco.

I have main ticket 276697
Here is another ticket in another account: 276697
And here is a link to anoter simple project you can reproduce (feel free to push or do any changes): Sign Up - Replit

It´s unfortunate this was never resolved. After dropping my production database for 6 times in hope it would be eventually resolved, I decided to rewrite all queries using these tables and drop the extension.

Assume there is a long TODO list in Replit, but it would be a pitty this one got lost in the middle of the noise. As it stands Replit does not support Postgis which is quite important for heavy location based apps.

That sucks. Rewriting all your queries just to work around a platform version mismatch shouldn’t be the answer. Hopefully this gets prioritized. @FranciscoCM