Skip to content
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

Change game id type so it won't overflow. #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Janzert
Copy link
Contributor

@Janzert Janzert commented Nov 27, 2017

*** This PR should be left unmerged until such time when it is ready to be run on the production database. ***

This changes the game id type in the database from mediumint to int so that the field doesn't overflow after 16 million games.

Because mysql cannot alter multiple tables in one transaction, before running the alembic upgrade game updates to the database should be stopped. This is probably easiest done by either by stopping the coordinator or stopping all workers. Specifically because the on delete cascade constraints will not be enforced while the update is made any games deleted during the update will leave orphan entries in the dependent tables. This will cause the re-addition of the constraints to fail after the update completes.

If other alembic revisions are added after the creation of this PR but before it is merged the revision here will need to have its down_revision changed to the current head.

@Janzert Janzert requested review from julskast and removed request for julskast November 28, 2017 15:46
@Janzert
Copy link
Contributor Author

Janzert commented Nov 28, 2017

Sorry thought I was looking at my div end tag PR #337, but I see @harikmenon just merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant