Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
"Duplicate row" doesnt duplicate primary or unique fields #396
Steps to reproduce this issue
The fields are empty
I expect those fields are duplicated as above row
just duplicate those columns and let user change them
HeidiSQL lets these out intentionally, as you would get some "duplicate entry" error when posting such values. The user would be forced to change unique values otherwise. That's a solution to a problem, not a bug. What do you propose to solve that issue?
Leaving empty throws another error, "Fields doesnt have default value". This just changes the problem not solve it. This also makes the problem worse. What i mean that, when you duplicate a row a and leave primary fields empty, user have to type all the fields, that nullifies convinience of duplicating row.
But If it would have duplicated all fields no matter what, user have to change only one primary key field to make it not duplicate.
In my case, there are 3 primary fields which two of them are timestamps. When those are left empty, I have to manually type those 3 fields. Bu all i need the change the just hour value of the one timestamp column.
You force the user fill 3 column instead of just change a part of 1 column.
I believe that my solution is more convinient for duplicating the row.
As there were users complaining about exactly these unwanted unique key values in a duplicated row, I propose a second "Duplicate row" menu item, perhaps labelled "Duplicate row with keys". The other one should probably renamed to "Duplicate row without keys". Hoping that "keys" is clear for the user that it means "primary or unique key values", as that would be too long for the context menu.