Migrations + PostGIS
See original GitHub issueDescribe 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.
Additional context https://github.com/wkrueger/geostore
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 namedtiger
andtopology
. I’ll open a PR.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.