-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support different reset modes during import #26
Commits on Dec 11, 2023
-
Introduce the idea of different modes to clear the database before im…
…port Currently the only mode is the existing behaviour, however this opens the door to other approaches.
Configuration menu - View commit details
-
Copy full SHA for d79475c - Browse repository at this point
Copy the full SHA d79475cView commit details -
Allow users to opt-out from resetting the database
This is unlikely to be common, however it provides an escape hatch for advanced users who want to do their own thing.
Configuration menu - View commit details
-
Copy full SHA for 765c6f8 - Browse repository at this point
Copy the full SHA 765c6f8View commit details -
Validate all reset modes when testing imports
This is slightly wassteful, but should mean we cheaply get good coverage over all the interesting model relations we come up with.
Configuration menu - View commit details
-
Copy full SHA for c555467 - Browse repository at this point
Copy the full SHA c555467View commit details -
Ensure that Postgres sequence import works with the 'none' reset mode
Sequences don't nicely fit into one of just schema or data, they're somewhat inherently both. Given that Django's "loaddata" over-writes existing rows in tables, it seems reasonable to do something similar for sequences -- even if that means we actually drop the sequence and fully re-create it.
Configuration menu - View commit details
-
Copy full SHA for f058c73 - Browse repository at this point
Copy the full SHA f058c73View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb9cec6 - Browse repository at this point
Copy the full SHA fb9cec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 78f06a3 - Browse repository at this point
Copy the full SHA 78f06a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f06dd84 - Browse repository at this point
Copy the full SHA f06dd84View commit details -
Configuration menu - View commit details
-
Copy full SHA for 87566b2 - Browse repository at this point
Copy the full SHA 87566b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for b94d9df - Browse repository at this point
Copy the full SHA b94d9dfView commit details
Commits on Dec 20, 2023
-
Remove redundant migrations dumping
This happens in self.dump_data_for_import, likely I missed this in 78f06a3.
Configuration menu - View commit details
-
Copy full SHA for b8d61fa - Browse repository at this point
Copy the full SHA b8d61faView commit details -
Ensure Django's migrations table is consistently present
This introduces a util to simplify this and adds usage to a couple of places which had been missed.
Configuration menu - View commit details
-
Copy full SHA for 05da3db - Browse repository at this point
Copy the full SHA 05da3dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e7e3f20 - Browse repository at this point
Copy the full SHA e7e3f20View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4227139 - Browse repository at this point
Copy the full SHA 4227139View commit details -
Demonstrate the result of reset-mode none over existing data
Essentially we get a merging of the two sources of data.
Configuration menu - View commit details
-
Copy full SHA for 7d50fbd - Browse repository at this point
Copy the full SHA 7d50fbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 219e810 - Browse repository at this point
Copy the full SHA 219e810View commit details -
Importing, even in the 'none' case, is potentially destructive so we want to give the user a chance to bail.
Configuration menu - View commit details
-
Copy full SHA for 3ad2e85 - Browse repository at this point
Copy the full SHA 3ad2e85View commit details -
Improve documentation on how the reset modes behave
Also includes docs for the Postgres sequences extra.
Configuration menu - View commit details
-
Copy full SHA for 729a19f - Browse repository at this point
Copy the full SHA 729a19fView commit details