-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.226.4] Many geometry column references are not removed by the migration #107
Comments
When I run the migrations with threedi-schema 0.226.4 on Boezemmodel__neerslag, all of the tables you mention are gone after the migration. Can we look at this together when you have time? |
Went through this with Leendert and it appears to work. |
Update: the tables are removed, but the references to the geometry columns in the def drop_deleted_geom_column_triggers():
geometry_column_references = []
connection = op.get_bind()
result = connection.execute(sa.text("SELECT * FROM geometry_columns;")).fetchall()
for row in result:
geometry_column_references.append({"table": row[0], "column": row[1]})
for reference in geometry_column_references:
try:
connection.execute(sa.text(f"SELECT {reference['column']} FROM {reference['table']};"))
except sqlalchemy.exc.OperationalError:
connection.execute(sa.text(f"SELECT DiscardGeometryColumn('{reference['table']}', '{reference['column']}';")) |
@leendertvanwolfswinkel Margriet says that there is an epic with all the last cleanup things for when the 300 schema migration is almost ready, and suggests that this should go in there. |
So it may be better to modify |
See for example the Boezemmodel__neerslag schematisation
The text was updated successfully, but these errors were encountered: