Skip to content

Create Forge::dropPrimaryKey() #6488

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

Merged
merged 7 commits into from
Sep 7, 2022
Merged

Conversation

sclubricants
Copy link
Member

@sclubricants sclubricants commented Sep 3, 2022

This PR creates a method to drop primary keys from a table.

This is the second part of #6430

This solves part of #4653

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

This method drops a primary key on an existing table
This method removes primary key from Table class preventing the primary key from being recreated.
This method uses the Sqlite Table class to dop the primary key
@sclubricants sclubricants added enhancement PRs that improve existing functionalities database Issues or pull requests that affect the database layer missing feature Reported issue which is not a bug but needs to be implemented 4.3 and removed enhancement PRs that improve existing functionalities labels Sep 3, 2022
@kenjis kenjis added the enhancement PRs that improve existing functionalities label Sep 4, 2022
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

Awesome. Looks good to me but let's get another review from a database maintainer.

@MGatner
Copy link
Member

MGatner commented Sep 4, 2022

@sclubricants Related to my last comment, I am working on putting together a team for database reviews and issues: https://forum.codeigniter.com/showthread.php?tid=82920

Would you be willing to join this team? It wouldn't be much different than how things are now, but you might get more requests to look at database Pull Requests. Any participation is of course optional (we're all volunteers here). Your expertise would be very welcome!

@sclubricants
Copy link
Member Author

sclubricants commented Sep 4, 2022

@MGatner Sure, be glad to help.

Im working on a PDO/ODBC driver as we speak. ODBC gets messy. I half way built one a while back but it needs a lot of work. Would be great to have it as part of CI. I use it a lot.

Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

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

LGTM!

@kenjis kenjis merged commit e6893f3 into codeigniter4:4.3 Sep 7, 2022
@sclubricants sclubricants deleted the dropPrimaryKey branch September 11, 2022 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Issues or pull requests that affect the database layer enhancement PRs that improve existing functionalities missing feature Reported issue which is not a bug but needs to be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants