Bug 400803

Summary: mysql import does not convert enum index from column default value
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: importerAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.26.2 (KDE Applications 18.08.2)   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 2.26.80 (KDE Applications 18.11.80)
Attachments: sql test file

Description Ralf Habacker 2018-11-07 15:16:48 UTC
Created attachment 116154 [details]
sql test file

mysql enum support provides numeric values for table column default values (see 
https://dev.mysql.com/doc/refman/8.0/en/enum.html). Importing such statements results into a numeric default value, which umbrello does not understand. The numeric value should be converted to the related enum literal.

STEPS TO REPRODUCE
1. start umbrello
2. set active language to mysql
3. import the appended sql file

OBSERVED RESULT
After import opening the properties the table column 'tipo_empleado' shows '2' as default value

EXPECTED RESULT
The default value of the mentioned column should be 'Empleado'
Comment 1 Ralf Habacker 2018-11-08 14:20:01 UTC
Git commit 916330afea84f080fdefba4f5ca9ea4440d4f33a by Ralf Habacker.
Committed on 08/11/2018 at 13:16.
Pushed by habacker into branch 'master'.

Add support for importing indexed enum type default values from mysql files
FIXED-IN:2.26.80 (KDE Applications 18.11.80)

M  +16   -3    umbrello/codeimport/sqlimport.cpp
M  +0    -3    umbrello/uml1model/entityattribute.cpp

https://commits.kde.org/umbrello/916330afea84f080fdefba4f5ca9ea4440d4f33a