phpmyadmin / phpmyadmin/phpmyadmin
"Online"/Instant Foreign Key updates
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 7.9k
- Forks
- 3.6k
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 36
Description
Hey
It would be nice if we had a "Enable foreign key checks" checkbox in this screen here.
The reason is that if I am updating existing foreign keys, for example, from "CASCADE" to "RESTRICT",
I don't want the query to take a long time to run the two ALTER TABLE this edit generates.
If we disable FK checks, the ALTER TABLEs will run instantly/online.
Otherwise, it locks all the tables involved and the website goes down due to critical tables being locked.
What I'm doing at the moment is "Preview SQL" and then run it in the SQL tab with FK checks disabled. It's a few manual steps.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the screen shown in the issue and trace the existing Preview SQL flow and the SQL tab execution path. Determine where the proposed checkbox should affect foreign-key checks around the generated ALTER TABLE statements; done means the option is available in that screen and the generated updates can run with checks disabled without requiring the current manual steps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, mysql, php
- Domain
- databases, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100