Skip to content

馃挕 Changed the lock_key column constraint to primary key - #243

Merged
tpatel merged 2 commits into
masterfrom
change-lock-key-constraint-to-pk
Feb 25, 2021
Merged

tpatel merged 2 commits into
masterfrom
change-lock-key-constraint-to-pk

Conversation

@tpatel

@tpatel tpatel commented Feb 23, 2021

Copy link
Copy Markdown
Contributor

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

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

Comment thread lib/database.js
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
@daniellockyer
daniellockyer self-requested a review February 24, 2021 18:01
Comment thread migrations/add-primary-key-to-lock-table.js Outdated
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
});
});

it('change current version', function () {

Copy link
Copy Markdown
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

naz commented Feb 25, 2021

Copy link
Copy Markdown
Contributor

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

@naz naz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

馃拑

@naz

naz commented Feb 25, 2021

Copy link
Copy Markdown
Contributor

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

tpatel commented Feb 25, 2021

Copy link
Copy Markdown
Contributor Author

@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