aurweb/migrations/versions
Kevin Morris a29701459c
feat: add Decision column to TUVote
In preparation for allowing TUs to change their votes on proposals,
we need a way to track what users vote for.

Without this, the vote decisions are stored within the related
TU_VoteInfo record, decoupled from the user who made the vote.

That being the case meant we cannot actually change a vote, because
we can't figure out what TU_VoteInfo decision columns to decrement
when the vote has changed.

You may be wondering why we aren't removing the decision columns out
of TU_VoteInfo with the advent of this new column. The reason being:
previous votes are all calculated off of the TU_VoteInfo columns, so
without a manual DB rework, relocating them to the user-related vote
records would break outcomes of old proposals. So, the plan is:
we'll solely use this column for votes from this point on to track
what decision a user made internally, which will open up TUs changing
their decision.

In addition, this migration resets all running proposals:
- all votes are deleted
- time is reset to Start when migration is run

This was necessary to put running proposals into a state that can
take advantage of the new revote system.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-03-07 22:35:52 -08:00
..
56e2ce8e2ffa_utf8mb4_charset_and_collation.py Merge branch 'master' into pu 2021-06-06 17:21:57 -07:00
84cd90073dde_relocate_vote_decisions_into_tuvote.py feat: add Decision column to TUVote 2022-03-07 22:35:52 -08:00
be7adae47ac3_upgrade_voteinfo_integers.py feat(migrations): add upgrade_voteinfo_integers ref 2022-01-06 20:27:23 -08:00
d64e5571bc8d_fix_pkgvote_votets.py fix: resolve null VoteTS columns via migration 2022-02-18 16:16:07 -08:00
ef39fcd6e1cd_add_sso_account_id_in_table_users.py remove unused imports, rectify isort violations 2021-06-05 21:27:39 -07:00
f47cad5d6d03_initial_revision.py remove unused imports, rectify isort violations 2021-06-05 21:27:39 -07:00