question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrations + PostGIS

See original GitHub issue

Describe the bug Migrations does not recognize the tables under the “topology” schema/tablespace as “system tables”, attempting to remove them. They seem to be treated as tables within the same context/tablespace.

Migration excerpt:

    this.addSql('drop table if exists "layer" cascade;');
    this.addSql('drop table if exists "topology" cascade;');

If I create an entity names “Layer”, the migration attempts to modify the existing “layer” table as if it belonged to the same tablespace.

image

Additional context https://github.com/wkrueger/geostore

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
corbtcommented, May 9, 2022

Ah I see, being able to migrate diffs across all the schemas could be a handy feature I guess!

Building in support for an ignoreSchema configuration option would be nice, but since PostGIS is so widely used I think including its schemas by default would be a good start. Those schemas are named tiger and topology. I’ll open a PR.

1reaction
mnowaczykcommented, Apr 4, 2022

It’s still broken, this time not with PostGIS, but with pg_cron. Generated migrations try to drop schema “cron”, even though it’s not in the search path. In my opinion the ORM shouldn’t touch other schemas unless instructed to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

35. Software Upgrades — Introduction to PostGIS
However, if you are migrating to a new architecture or operating system, it's a required process. It's also a time-tested and well-understood upgrade...
Read more >
PostgreSQL/Postgis migrations - Laracasts
PostgreSQL/Postgis migrations. I'm currently developing a GeoSpatial microservice handeling regions definitions and GeoHash cell data.
Read more >
How to migrate PostGIS databases between Postgres versions?
1 Answer 1 ... pg_dumpall should work. Make sure that you have already installed the new PostGIS extension, and that you are not...
Read more >
Migrating from old PostGIS to new PostGIS Read-Write data ...
Run GeoMedia, connect to the old database using the old "PostGIS" data server, and then make a connection to the mynewdb using the...
Read more >
postgis/MIGRATION at master - GitHub
PostGIS spatial database extension to PostgreSQL [mirror] - postgis/MIGRATION at master · postgis/postgis.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found