-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
"snipeit:restore" wipes the database and migrates #15363
base: develop
Are you sure you want to change the base?
Conversation
PR Summary
|
This seems to mostly work, but I'm having a little trouble when I try to restore without doing the cleaning, but with doing the db:wipe. The results are weird - I am restoring a file that has prefixes, so I would expect to see just my prefixed tables in the DB. I'm getting those prefixed tables, but also I'm getting the 'correct' unprefixed tables. But those tables are mostly empty - except for users - just one user record is in there. I think that one user is the restored one as part of the web GUI restore process. What's weird is I am seeing the debugging messages output saying that it's doing the wipe. Maybe it's using some other record of what the schema is? I'm not sure. I'm going to keep messing with it until I can get an explanation, or maybe a fix. Maybe I'll try a |
I blanked a database and created a fake table, then did a restore via CLI with the |
This is a follow-up on #15296 - this embeds the db:wipe, and the migrate command into the CLI, and removes them from the Settings controller. It also exposes the option in the web GUI so you can disable the db:wipe before the restore, if for some reason you want that.
I tried to make this PR against the previous PR, but it wouldn't let me do that without putting the PR in my own repo, which I did not want.
So, instead, it just embeds the contents of the previous PR in it. Which is weird, but, well, that's what it does.
This is mostly untested, but I'm going to be doing said testing shortly. Once I've tested all of the various modes, I'll pull it out of 'Draft'.