-
Notifications
You must be signed in to change notification settings - Fork 112
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
Update Event model to contain a status field #408
Comments
I might have this done. But wanted to get clarification about the function that was mentioned. Are you looking for a function to update the documents that are already in the database with the status field? If so, I have a script that we should be able to use for that to do it all at once. |
Good question. This was part of the reason why it's on hold. I'm unfamiliar with in what order this should be done. |
Since the status field isn't actually being used yet. We could update existing events first and then right after that merge this in. We can discuss this more, but you could create temporary user in mongo with access to that specific collection then I can use that connection string to insert the field with the default |
How would the existing events be updated? You mentioned a script, is that script executed outside of the codebase? |
Yea it would run outside of the current codebase. I have a Python script that can connect to the database, query for all docs where the status field is missing(currently all of them) and then add the status field with the default value. |
Ok, I think we should start with that then. Is there any sort of testing that needs to be done prior to attempting this on production data, can we backup the DB? |
We can test it on a fake collection to make sure it works as it should. There are also back up option in Mongo so we can take a snapshot before we run the script to preserve the data at that point in time. |
Hey there, can we setup a time this week to address this? |
Related Issues
Project: Admin Dashboard
Depends on: TBD*
Description
Add
status
toEvents.js
modelstatus
should be a string with default ofpending
& required oftrue
Create a function to update all current event objects to have status field. Set as active.
Acceptance Criteria
status: pending
Key value.*Ticket on hold to discuss how to test without messing with production data.
The text was updated successfully, but these errors were encountered: