-
Notifications
You must be signed in to change notification settings - Fork 5
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
set obj_id sequences when importing #223
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
@cymed Funktioniert das auch wenn du Daten mit verschiedenen Präfixes hast in einer Tabelle? |
I do not really understand the code. I think to understand, that the prefix has no effect !? |
for more information, see https://pre-commit.ci
…I-wastewater into import_reset_sequence
The latest push includes the oid_prefix and re-sets all sequences to the new prefix once there is change in tww_sys.oid_prefixes, making it more dynamic. |
Same question as @sjib, what happens when you import data with a different oid than the active one? |
So whether we import data with different prefixes or not seems not relevant here. More relevant is that it is clear with which prefix the user wants to go on creating new data.
@cymed @urskaufmann @ponceta - are we here all at the same point of understanding? |
I agree in general. If we want to show which prefix is active, I suggest putting it into the settings. Also, once we go towards multitenancy, we'll need a way to switch between tenants anyway |
I agree with @sjib . And to show the active prefix is also good idea (anyway, if you care, you will see the active prefix with every new record you create in the obj_id...) |
for more information, see https://pre-commit.ci
messes with regex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be wise to add some tests for that also?
This PR sets the sequences used for obj_id generation based on the current value of the sequence and the highest imported postfix with a matching shortcut. Mainly necessary when importing a dataset that was exported by TEKSI. Tackles #117