aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/utils/resources.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-09-30 15:17:03 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2019-09-30 15:42:16 +0200
commit9b38f42272994350a6bb58da796dcca86ee628d9 (patch)
tree853f4cee539bef70bc52367651f4e8f3bc6e09fb /pydis_site/utils/resources.py
parentMerge pull request #261 from python-discord/decoupling-warnings-and-notes (diff)
Migrate nominations to new Nomination model
Before the migration to Django, we stored meta data on a nomination, such as the `reason` and `end_reason`, in the infraction table using "note" infractions, using a special prefix for the `reason`. We have since decided to move nominations out of the infraction context by creating a special `Nomination` model. However, given the complexity of the data migration, we did not yet migrate the old nomination data to this new model. This commit migrates that data by performing a data migration. The data migration works as follows: - Query all nomination data in chronological order; - Replay all nominations and add them to the `Nomination` model; - Delete the now obsolete `Infraction` entry. In addition, this commit also adds a useful string representation for `Nomination` objects.
Diffstat (limited to 'pydis_site/utils/resources.py')
0 files changed, 0 insertions, 0 deletions