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

💡 Changed the lock_key column constraint to primary key #243

Merged
merged 2 commits into from
Feb 25, 2021

Conversation

tpatel
Copy link
Contributor

@tpatel tpatel commented Feb 23, 2021

issue https://github.com/TryGhost/Team/issues/267

Tables without primary keys cause issues with MySQL replication & clustering.

lib/database.js Outdated Show resolved Hide resolved
issue https://github.com/TryGhost/Team/issues/267

Tables without primary keys cause issues with MySQL replication & clustering.
@tpatel tpatel force-pushed the change-lock-key-constraint-to-pk branch 2 times, most recently from 5e7cc7d to b5b7583 Compare February 24, 2021 16:26
@tpatel tpatel requested a review from naz February 24, 2021 16:49
issue TryGhost/Team#267

- Tables without primary keys cause issues with MySQL replication & clustering.
@tpatel tpatel force-pushed the change-lock-key-constraint-to-pk branch from b5b7583 to 169ebf6 Compare February 24, 2021 18:12
@@ -798,5 +798,23 @@ _.each(['default', 'migrateInit'], function (initMethod) {
});
});
});

it('change current version', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much love for this ❤️

@naz
Copy link
Contributor

naz commented Feb 25, 2021

@tpatel our of curiosity, was there a particular reason why we didn't go with async/await syntax here? The change is good otherwise 🚀

Copy link
Contributor

@naz naz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃

@naz
Copy link
Contributor

naz commented Feb 25, 2021

Also, approving this with knowledge in mind that the primary key migrations were copied from Ghost and will be extracted into utilities package when there's time. For now it's a "good enough" approach 👍

@tpatel
Copy link
Contributor Author

tpatel commented Feb 25, 2021

@tpatel our of curiosity, was there a particular reason why we didn't go with async/await syntax here? The change is good otherwise 🚀

The reason is that the linter was screaming at me for using async/await for some reason, and I didn't want to go down a rabbit hole changing it so I followed its directions 😂

@tpatel tpatel merged commit 3749a6c into master Feb 25, 2021
@tpatel tpatel deleted the change-lock-key-constraint-to-pk branch February 25, 2021 08:23
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.

3 participants