Bug 400797

Summary: mysql exporter does not supports enums
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: exporterAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 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)
Sentry Crash Report:
Attachments: test case

Description Ralf Habacker 2018-11-07 11:47:23 UTC
Created attachment 116149 [details]
test case

The mysql export does not support exporting enums


STEPS TO REPRODUCE
1. start umbrello
2. open appended file
3. export to mysql code (select menu entry code->code generation wizard)
4. inspect generated mysql file

OBSERVED RESULT
The table columns having an enum type does not specify the enum literals. Instead there is only the enum type name exported e.g.

  tipo_empleado ENUM_1 NOT NULL  DEFAULT 2,


EXPECTED RESULT
The export table columns having an enum type should generate something like this

  tipo_empleado ENUM('Supervisor', 'Empleado', 'Obrero', 'Menor') NOT NULL  DEFAULT
Comment 1 Ralf Habacker 2018-11-07 12:18:47 UTC
Git commit 9b82bc3811e13864bf92399ce3cc7dd96012f47f by Ralf Habacker.
Committed on 07/11/2018 at 12:18.
Pushed by habacker into branch 'master'.

Export of enums for mysql exporter added
FIXED-IN:2.26.80 (KDE Applications 18.11.80)

M  +13   -1    umbrello/codegenerators/sql/sqlwriter.cpp

https://commits.kde.org/umbrello/9b82bc3811e13864bf92399ce3cc7dd96012f47f
Comment 2 Ralf Habacker 2018-11-20 00:28:30 UTC
Git commit e83716f8afa1ce2324d86662f8300b6b4f83a3e7 by Ralf Habacker.
Committed on 19/11/2018 at 23:40.
Pushed by habacker into branch 'Applications/18.12'.

Crash fix in case of exporting an entity relation diagram

See https://bugs.kde.org/attachment.cgi?id=116414 for the test case.

M  +2    -1    umbrello/codegenerators/sql/sqlwriter.cpp

https://commits.kde.org/umbrello/e83716f8afa1ce2324d86662f8300b6b4f83a3e7