-
Notifications
You must be signed in to change notification settings - Fork 14
Remove Asset.previous
field
#2008
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
0a1dd28
to
68749e3
Compare
Keeping this as draft until it's ready to merge, since we'll want to perform a DB backup before doing so. |
I think we talked about it already, but can you remind me why we need a DB backup before rolling this out? We have the DB snapshot just before audit rolled out, and since that time everything we want to track should be in the audit table. We could take another DB backup out of an abundance of caution, but it's not strictly necessary, is that right? (The tradeoff here is just a downtime if we want to take the backup for safety purposes.) |
@waxlamp - was the previous link captured in the audit log? i.e. did audit backfill old entries based on the database? |
No, instead of backfilling the audit records table with that information, we captured a database backup that preserves whatever historical information exists, giving us the option of performing the backfill at any time. The major problem will be that most of the information that we currently capture in audit records is not recoverable from the previous links (see the audit design doc for details). If we decide we want to do this backfill, we should open an issue and discuss it there. Let me know what you think. |
68749e3
to
e3574ed
Compare
Now that audit is implemented, we can remove the `previous` field from the `Asset` model. This field was used to store the previous version of an asset, but it is no longer needed since we can track changes using the audit log.
e3574ed
to
a3c3288
Compare
🚀 PR was released in |
Now that audit is implemented, we can remove the
previous
field from theAsset
model. This field was used to store the previous version of an asset, but it is no longer needed since we can track changes using the audit log.This also unblocks garbage collection, which will follow this PR.
(GC docs -
https://github.com/dandi/dandi-archive/blob/master/doc/design/garbage-collection-1.md
https://github.com/dandi/dandi-archive/blob/master/doc/design/garbage-collection-uploads-asset-blobs.md
)
Keeping this as draft until it's ready to merge, since we'll want to perform a DB backup before doing so.