Bug 400803 - mysql import does not convert enum index from column default value
Summary: mysql import does not convert enum index from column default value
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: importer (show other bugs)
Version: 2.26.2 (KDE Applications 18.08.2)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-07 15:16 UTC by Ralf Habacker
Modified: 2018-11-08 14:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.26.80 (KDE Applications 18.11.80)


Attachments
sql test file (2.21 KB, application/sql)
2018-11-07 15:16 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
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