-
Notifications
You must be signed in to change notification settings - Fork 4
Change to UUID indexes and use django-postgres-copy
#803
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
Conversation
Also bumped dev version
… into UUID_indexes
Alright. Ill take a closer look on Monday. |
…and runs in image page.
|
Let's leave the UUID character set stuff as-is for now and I can tweak the details later. I've opened an issue for that: #807. As discussed yesterday, let's go with a "short" option (5 characters) for runs, images etc. medium (12 characters) for sources and long (15 characters) for measurements. |
ddobie
left a comment
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.
Looks good to me at this stage, although I suspect you're still working on things
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.
Just to double check, the migrations file is automatically generated? So even though the character sets and lengths are hardcoded in here, they're functionally not hardcoded anywhere except where they're defined?
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.
Just to double check, the migrations file is automatically generated? So even though the character sets and lengths are hardcoded in here, they're functionally not hardcoded anywhere except where they're defined?
They are defined here: https://github.com/askap-vast/vast-pipeline/blob/UUID_indexes/vast_pipeline/utils/utils.py#L28
then they are put into the models here (e.g.): https://github.com/askap-vast/vast-pipeline/blob/UUID_indexes/vast_pipeline/models.py#L110
The migrations are created from the models using migrate.py makemigrations so if you change the character set in utils.py you need to update the migrations as well with that command (Ideally you aren't going to be updating the migrations very often!).
And likely only when you start a new database from scratch!
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.
Also -there are some hardcoded source strings in the test .csv files so those would also have to change if you changed the string length.
ddobie
left a comment
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.
Good to go - just a minor typo in the comments
Co-authored-by: Dougal Dobie <[email protected]>
Co-authored-by: Dougal Dobie <[email protected]>
Co-authored-by: Dougal Dobie <[email protected]>
Mostly based on #707 but with changes to refect more recent changes to the pipeline:
delete_run_raw_sqlto deal with UUIDscopy_upload_model, makeobject_ida UUID inCommentModel)prevandnextbuttons in the web interface so I fixed these, and made minor changes to the text in the web interface (ID number -> ID)delete_run_raw_sqlwhere multiple sources using the same tag cause the delete to crash (The fix was to only delete a tag when there are no more database sources referenceing it)1. Need to see ifobject_idinCommentmodel needs to be UUID so we can delet using raw SQL on that rather thanid2. The associations_df upload and prep for it might be reverted to behaviour from pre #787 - will have to check and update if necessary3. Need to set up q3c migrations for the database automatically.4. Need to merge #800 into this so that vaex doesn't break everything.