Skip to content
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

Inflow schema 300 #66

Merged
merged 33 commits into from
Aug 1, 2024
Merged

Inflow schema 300 #66

merged 33 commits into from
Aug 1, 2024

Conversation

margrietpalm
Copy link
Contributor

@margrietpalm margrietpalm commented Jun 3, 2024

This is a pretty complex migration, as you can see on zenhub. One of the main issue is that all geometry columns should be not Null while before the migration these columns can be Null. Alembic doesn't allow migrating these Null columns to the new tables. So in general the workflow is as follows:

  • Create new empty tables matching the new schema
  • Modify existing table (v2_impervious_surface or v2_surface) such that all data that will be present in the new tables is already present
  • Copy from modified table to new table

Question to the reviewer:

I did not implement tests for correctly copying the contents during the migration because of the complexity of this code. The chance of mistakes in the tests are as big as the chance of mistakes in the actual code. Any mistakes should be caught downstream when testing the simulatons; I hope.

@margrietpalm margrietpalm force-pushed the margriet_65_schema_300_inflow branch from 63ee3e7 to 875a712 Compare June 4, 2024 06:28
@margrietpalm margrietpalm force-pushed the margriet_65_schema_300_inflow branch from e15735e to 9aca398 Compare June 4, 2024 09:59
@margrietpalm margrietpalm changed the title WIP: Inflow schema 300 Inflow schema 300 Jul 30, 2024
Copy link
Contributor

@daanvaningen daanvaningen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work :) I tried following along using the excel sheet. But it is a bit difficult to follow and judge

As for your question, incorrect changes to the mapping of surfaces / dry weather flow will most likely be picked up by the testbank / regression tests.

threedi_schema/__init__.py Outdated Show resolved Hide resolved
threedi_schema/domain/models.py Outdated Show resolved Hide resolved
CHANGES.rst Outdated Show resolved Hide resolved
@margrietpalm margrietpalm merged commit 3c9d697 into master Aug 1, 2024
8 checks passed
@margrietpalm margrietpalm deleted the margriet_65_schema_300_inflow branch August 1, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants