DRAFT: Integrate multis into main accounts #370
Draft
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.
NOTE: this is a draft PR. I want to get feedback on the design before I commit to implementing it in full. However, in conjunction with dependent PR #368 (not included here for the sake of diff cleanliness), it is a fully functional draft -- you can log into the game, switch to/create multis, and move around.
I have considered a variety of ways to implement this idea; many were non-starters, others were way too dramatic and would require significant reconstruction... this was the first one that appeared to be both simple and effective.
Since this is such a major facet of the game infrastructure, I would really like to get some thoughtful feedback before continuing.
Current commit message follows below.
The purpose of this is twofold:
having to log in and out.
make sense to have two values (i.e. e-mail address, user
preferences, bans, etc.).
Add a new table
account_link_login
, which associates alogin_id
(the new primary key replacing
account_id
in theaccount
table)with an
account_id
(the primary key ofaccount_link_login
).Each "login" (
account
) can be associated with multiple "accounts"(
account_link_login
).This is a little confusing, since ideally the
account
table wouldbe renamed
login
(or similar), but we are probably a bit too heavilyinvested in the original infrastructure to completely change it now.
We provide a way on the "Play Game" page to switch to/create multis,
including an option to link an existing account as a multi.
Adds two helper methods to SmrAccount: