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

Add primary keys to tables that are missing them #9359

Closed
wants to merge 3 commits into from
Closed

Add primary keys to tables that are missing them #9359

wants to merge 3 commits into from

Conversation

Jelle-S
Copy link

@Jelle-S Jelle-S commented Mar 29, 2021

Description

Adds primary keys to tables where they are missing.
See See laravel/framework#15770 for a thorough explanation and more context.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested on our environment where the migrations table was missing the id column (shows you we've been using this since at least 2016 😅 ) and with the default database you get when installing snipe it

Checklist:

Some mysql clusters (like Percona-XtraDB-Cluster) prohibit the use of DML
commands on a table. It's also just a good practice to add it.
@Jelle-S Jelle-S requested a review from snipe as a code owner March 29, 2021 13:30
@welcome
Copy link

welcome bot commented Mar 29, 2021

💖 Thanks for this pull request! 💖

We use semantic commit messages to streamline the release process and easily generate changelogs between versions. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix if it doesn't have one already.

Examples of commit messages with semantic prefixes:

  • Fixed #<issue number>: don't overwrite prevent_default if default wasn't prevented
  • Added #<issue number>: add checkout functionality to assets
  • Improved Asset Checkout: use new notification method for checkout

Things that will help get your PR across the finish line:

  • Document any user-facing changes you've made.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@Jelle-S Jelle-S changed the title Add Add primary keys to tables that are missing them Mar 29, 2021
@uberbrady uberbrady changed the base branch from master to develop March 29, 2021 16:27
@uberbrady uberbrady changed the base branch from develop to master March 29, 2021 16:27
Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

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

If you can retarget these changes to the Develop branch, we'll take them.

@snipe
Copy link
Owner

snipe commented Mar 30, 2021

I’m still kind of unclear what problem this solves, exactly?

Some mysql clusters (like Percona-XtraDB-Cluster) prohibit the use of DML
commands on a table. It's also just a good practice to add it.

See laravel/framework#15770
Some mysql clusters (like Percona-XtraDB-Cluster) prohibit the use of DML
commands on a table. It's also just a good practice to add it.
@Jelle-S
Copy link
Author

Jelle-S commented Mar 30, 2021

I’m still kind of unclear what problem this solves, exactly?

Some database systems (like XtraDB cluster) require explicit primary keys for all tables, so this PR adds them to those that are missing them.

I'm closing this one and created a new one for develop: #9363

@Jelle-S Jelle-S closed this Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants