Bug 277981 - The user should get a warning when trying to set a non integer field to primary key
Summary: The user should get a warning when trying to set a non integer field to prima...
Status: CONFIRMED
Alias: None
Product: KEXI
Classification: Applications
Component: Tables (show other bugs)
Version: 2.4 alpha3 (Calligra 2.4 alpha3)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kexi Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-17 22:04 UTC by Dimitrios T Tanis
Modified: 2021-03-09 23:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitrios T Tanis 2011-07-17 22:04:35 UTC
Version:           2.4 alpha3 (Calligra 2.4 alpha3) (using KDE 4.6.0) 
OS:                Linux

Trying to set a non integer field to primary key results in the field's type to be changed to integer without a warning.
That COULD LEAD TO DATA LOSS!

Reproducible: Always

Steps to Reproduce:
Open a table at design view.
Select a field with a data type other than integer.
Click to make it primary key.


Actual Results:  
The field's type is converted to integer without any warning.
Saving the table could lead to data loss.

Expected Results:  
The user should be prompted that only an integer field is accepted as a primary key, and let the user change the type himself if he wanted.

When a different type could be allowed to be a primary key, the message should be changed accordingly.
Comment 1 Jarosław Staniek 2011-07-17 22:22:57 UTC
Thanks, non-intrusive warning is a good idea.

That said, some databases have good support for text types as primary keys...
Comment 2 Justin Zobel 2021-03-09 23:43:22 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.