custom Version models per model?
See original GitHub issueAhoy @etianen ,
I googled for a while and couldn’t find any information on that:
I was wondering if it would be helpful/clever/possible to create per model Version models, i.e.:
@reversion.register()
class Person(models.Model):
...
would yield a myapp_person_version
table, or a reversion_myapp_person_version
or similar. Or alternatively add a function argument to register()
to pass in a different Version-model for specific models?
My reasoning here being that that single reversion_version
table is gonna grow quite rapidly in my scenario and at least based on my naive database knowledge I think it would be helpful to be able to spit it into semantically seperated tables.
Cheers
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Sharing custom models - Hugging Face
In this tutorial, we will show you how to write a custom model and its configuration so it can be used inside Transformers,...
Read more >Custom Models - Meta Integration
o Custom Models are instantiations of a custom model type in the metamodel and may be populated via the UI, bulk CSV import,...
Read more >Custom Vision “compact” models - MLearning.ai - Medium
Select “compact” when creating a new model, there is a lightweight version for each domain. And don't worry, you can set this option...
Read more >Custom models with ML Kit | Google Developers
Supports custom models from a wide range of sources, from pre-trained models published on TensorFlow Hub to new models trained with TensorFlow, AutoML...
Read more >Custom Models - DataRobot Python package documentation
Custom models provide users the ability to run arbitrary modeling code in an environment defined by the user.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, you would lose historical data when you remove a field. However, if you’re not going to be migrating historical data, it rapidly becomes unparseable by the current version of the app. You’d have to make sure that your migrations are all reversible with no data loss. That way you can migrate your current and historical data back and forth.
A general-purpose solution for lossless, migrateable historical data does not exist. django-reversion makes a best effort, but at some point if you make a radical schema change your reversion history has to be deleted or tediously manually migrated.
So if you truly need a lossless historical data record, you’ll need a careful, custom solution.
On Tue, 12 Nov 2019 at 10:24, Andreas Nüßlein notifications@github.com wrote:
But if it participated in the migrations, you’d lose historical field data if you also removed a field. Or would you never remove fields/columns, but only ever add? I do understand that you have the same problem now: if i remove a field and i want to roll back an old version, where would that extra data from the serialized json go, either way 🤔 . But at least in the JSON the data would still be there.
I guess you’re right about the performance. But still: the queryability 🎉
Hmmmmh you’ve given me a lot to think about 😃