Skip to content
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

Docgenerator loaddb/freezedb safety #2

Open
mscuthbert opened this issue Sep 7, 2024 · 0 comments
Open

Docgenerator loaddb/freezedb safety #2

mscuthbert opened this issue Sep 7, 2024 · 0 comments

Comments

@mscuthbert
Copy link
Collaborator

Moved from
w3c/mnx#350


Since the sqllite file isn't committed to disk and doesn't change as branches change, but the m[usic|n]x(ml)?.json file does change with each branch change, I've found myself needing to be paranoid about whether I'm overwriting an older version of .json or of .sqllite with my loaddb/freezedb commands.

I wanted to propose that the spec.manangement.commands.freezedb/loaddb files check the timestamp of the .json file vs. the .sqllite file, and if the one being overridden is newer than the one being written from, that there would be a prompt asking for permission before doing so.

I was going to implement this on my own, but I realized quickly that I've never used Django with an sqllite db, so I couldn't figure out how to get the modified time of the database. If you agree that this would be useful, you can just send me the code to find the sqllite file (from within a management command) and I can probably write the rest quite easily.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant