Bug 277981

Summary: The user should get a warning when trying to set a non integer field to primary key
Product: [Applications] KEXI Reporter: Dimitrios T Tanis <dimitrios.tanis>
Component: TablesAssignee: Kexi Bugs <kexi-bugs>
Status: CONFIRMED ---    
Severity: normal CC: staniek
Priority: NOR    
Version: 2.4 alpha3 (Calligra 2.4 alpha3)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

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.