-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
WIP CSMH Extended Tables/Database #11441
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jibsheet
force-pushed
the
jibsheet/read-from-multiple-csmh-tables
branch
4 times, most recently
from
February 11, 2016 03:32
440256b
to
d6b7738
Compare
jenkins run all |
jibsheet
force-pushed
the
jibsheet/read-from-multiple-csmh-tables
branch
from
February 12, 2016 20:06
6eb607d
to
449a8eb
Compare
jibsheet
force-pushed
the
jibsheet/read-from-multiple-csmh-tables
branch
from
February 12, 2016 20:45
449a8eb
to
9963cca
Compare
This is a clone (copy) of CSMH's declaration and methods with an added id of bigint unsigned. We should be able to delete the save_history code, but needs testing.
This gives us a gap to backfill as needed. Since the new table's pk is an unsigned bigint, even for people who don't consolidate CSMH into CSMHE, the lost rows are unlikely to matter.
We need to use it from cms and lms
This is horrible and just smashes the code into the view and the client.
Handle queries directed to student_module_history vs default and the extra queries generated by Django 1.8 (SAVEPOINTS, etc). Additionally, flag testing classes as multi_db so that Django will flush the non-default database between unit tests.
The original branch split these across database but 1.8 adds a ton of SAVEPOINT queries as part of the code to rollback the database during unit tests.
When calling StudentModule().delete() Django will try to delete CSMHE objects, but naively does so in the database, not by consulting the database router. Instead, we disable django cascading deletes and listen for post_delete signals and clean up CSMHE by hand.
Without this, we would pull settings out of default and into secondary databases. Unfortunately, without adding more ENV variables, using this for anything other than DB_MIGRATION_USER or DB_MIGRATION_PASS will probably not do what you intend.
This now correctly migrates and dumps files for both databases.
These happen during the bok choy migration script that saves a cached version of the DB.
jibsheet
force-pushed
the
jibsheet/read-from-multiple-csmh-tables
branch
from
February 16, 2016 17:14
9963cca
to
a6dbdf2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.