Resolve "Re-introduce data migrations" #1757

Merged
hansegucker merged 5 commits from 137-re-introduce-data-migrations into master 2020-01-09 21:29:07 +01:00
Owner

Closes #137

Closes #137
Author
Owner

added 1 commit

  • 2ba8f32a - Re-introduce data migrations for admin user and school term

Compare with previous version

added 1 commit <ul><li>2ba8f32a - Re-introduce data migrations for admin user and school term</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1064&start_sha=bc009767bd54ff7800954399ae8d2f57f58dfbb6)
Author
Owner

unmarked as a Work In Progress

unmarked as a **Work In Progress**
Author
Owner

assigned to @nik

assigned to @nik
Owner

Nver import the User model directly. Please see the original migration code from BiscuIT or Django docs on what to do.

Nver import the User model directly. Please see the original migration code from BiscuIT or Django docs on what to do.
Owner

You need to do a few extra tricks to ensure the data access works in all configurations (for instance, use using t oselect the correct database). See the original migration code from BiscuIT.

You need to do a few extra tricks to ensure the data access works in all configurations (for instance, use `using` t oselect the correct database). See the original migration code from BiscuIT.
Author
Owner

resolved all threads

resolved all threads
Author
Owner

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1069&start_sha=2ba8f32a2769aa583f914394f6baa4a2b7b18f02#ef5cd24d5a2fcb1989bbb07b1b85c5f7173fbd08_2_3)
Author
Owner

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1069&start_sha=2ba8f32a2769aa583f914394f6baa4a2b7b18f02#ed81fabf551f0fb2ee34c9bcd285b77430369ba6_8_12)
Author
Owner

added 1 commit

  • a07b3513 - Re-introduce data migrations for admin user and school term

Compare with previous version

added 1 commit <ul><li>a07b3513 - Re-introduce data migrations for admin user and school term</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1069&start_sha=2ba8f32a2769aa583f914394f6baa4a2b7b18f02)
Owner

This will fail if no SchoolTerm exists.

Actually, setting a schoolterm to current manually was only necessary because the migration was added after there already was one that created the term.

Now that we are recreating everything, just create the thing if none exists yet and forget about it.

This will fail if no SchoolTerm exists. Actually, setting a schoolterm to current manually was only necessary because the migration was added after there already was one that created the term. Now that we are recreating everything, just create the thing if none exists yet and forget about it.
Owner

What are these two migrations good for? ALso, why is the migration this is actually about (the data migration for the school term) not included ;)?

What are these two migrations good for? ALso, why is the migration this is actually about (the data migration for the school term) *not* included ;)?
Author
Owner

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1070&start_sha=a07b351329ff288a2aabcefdc1ac65a1d16070ea#ed81fabf551f0fb2ee34c9bcd285b77430369ba6_10_11)
Author
Owner

changed this line in version 3 of the diff

changed this line in [version 3 of the diff](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1070&start_sha=a07b351329ff288a2aabcefdc1ac65a1d16070ea#ed81fabf551f0fb2ee34c9bcd285b77430369ba6_20_24)
Author
Owner

added 2 commits

  • 7f5f8fab - 1 commit from branch master
  • 3107e9e6 - Merge branch 'master' into 137-re-introduce-data-migrations

Compare with previous version

added 2 commits <ul><li>7f5f8fab - 1 commit from branch <code>master</code></li><li>3107e9e6 - Merge branch &#39;master&#39; into 137-re-introduce-data-migrations</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1070&start_sha=a07b351329ff288a2aabcefdc1ac65a1d16070ea)
Author
Owner

Because someone wrote a migration which had never worked and pushed it to master without testing ;).

No idea who „someone“ is :P…

Because someone wrote a migration which had never worked and pushed it to master without testing ;). No idea who „someone“ is :P…
Author
Owner

added 1 commit

  • 3ab70d86 - Merge branch 'master' into 137-re-introduce-data-migrations

Compare with previous version

added 1 commit <ul><li>3ab70d86 - Merge branch &#39;master&#39; into 137-re-introduce-data-migrations</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1071&start_sha=3107e9e6a63c666cc3d905f4b100156b8db36f92)
Author
Owner

resolved all threads

resolved all threads
Author
Owner

added 3 commits

  • 2d9cb6a7 - 1 commit from branch master
  • c683e6ba - Merge branch 'master' into 137-re-introduce-data-migrations
  • 6ab452cd - Fix migration.

Compare with previous version

added 3 commits <ul><li>2d9cb6a7 - 1 commit from branch <code>master</code></li><li>c683e6ba - Merge branch &#39;master&#39; into 137-re-introduce-data-migrations</li><li>6ab452cd - Fix migration.</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1072&start_sha=3ab70d86f31a3e201712dc39f592abc340a775ab)
Author
Owner

added 1 commit

Compare with previous version

added 1 commit <ul><li>c43ebd2a - FIx migration.</li></ul> [Compare with previous version](/AlekSIS/AlekSIS/merge_requests/112/diffs?diff_id=1073&start_sha=6ab452cdb9edf2f0f57c57f768aee52976fe2898)
Owner

mentioned in commit f6625580c6

mentioned in commit f6625580c64bda5ff52c8599e57d7b4f6bf439bd
Owner

merged

merged
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-Core!1757
No description provided.