mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-05 15:22:29 -05:00
make v1->v3 upgrade work with --features=bundled
--features=bundled enables -DSQLITE_DEFAULT_FOREIGN_KEYS=1, and so some operations have to be done in the proper order. * enable foreign key enforcement all the time, so I test this more reliably. * reorder some parts of the v1->v3 order. foreign key enforcement is immediate (rather than deferred) by default. and ensure old_recording_playback isn't left with a dangling reference to old_recording at the v2 stage. Instead, wait until v3 to delete tables it depends on.
This commit is contained in:
@@ -114,6 +114,9 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
|
||||
from
|
||||
old_recording_playback;
|
||||
drop table old_recording_playback;
|
||||
drop table old_recording;
|
||||
drop table old_camera;
|
||||
drop table old_video_sample_entry;
|
||||
"#)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user