[feature] Add primary key to DB tables
See original GitHub issueFeature Area
/area backend
What feature would you like to see?
That kfp create its database with a primary key (probably here and here, with something like:
DefaultExperimentId string `gorm:"column:DefaultExperimentId; not null; primary key"`
What is the use case or pain point?
Primary keys are required for group replication (high availability) of tables in mysql. Enabling this would enable using more resilient data storage.
Is there a workaround currently?
I don’t know if this is safe, but perhaps I can separately create the database following kfp’s schema (but with a primary key) and then have kfp connect to that existing DB? I’m not sure what the consequences of this would be.
update: This appears to work (application starts without errors, etc). Haven’t stress tested it yet
Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Create Primary Keys in SQL Server - Microsoft Learn
In Table Designer, click the row selector for the database column you want to define as the primary key. If you want to...
Read more >How to Create Primary Keys for MySQL Database Tables
How to Manually Add a Primary Key ; SHOW CREATE TABLE your_database_name. ; ALTER TABLE your_table_name ADD PRIMARY ; ALTER TABLE car ADD...
Read more >Adding primary key to some exising tables in a database
1. loop through all tables · 2. select ones that do not have primary keys · 3. add an auto incremented field ·...
Read more >MySQL Add Primary Key to MySQL Database Tables via the ...
Information on how to add primary keys to MySQL database tables using the MySQL Alter Table Add Primary Key command.
Read more >Creating Tables with a Primary Key in SQL - YouTube
You can apply rules or constraints to your database table when you create it with CREATE TABLE, or later on with ALTER TABLE.The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Linchin given the two PRs are identical, I’d suggest we give credit to @shayancanonical and merge the PR that was created first. It’s also our responsibility to actively monitor and review PRs from community contributors.
@shayancanonical a small tip to do avoid duplicate effort in the future: while you have “Fixes issue#” in the PR title which can close the issue upon PR merged, only when you have the same text in the PR description or comment section, the open PR will then be linked to the issue, so that those who look at the issue can easily see there’s a proposed fix already.
I see. I will go ahead and create a PR for this.