Bug 400802 - Postgresql exports incomplete enum types
Summary: Postgresql exports incomplete enum types
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: exporter (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:06 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 16.11.80)


Attachments
test case (30.45 KB, application/x-uml)
2018-11-07 15:06 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:06:49 UTC
Created attachment 116153 [details]
test case

Exporting an entity attribute with enum type results into an incomplete sql statement


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

OBSERVED RESULT
The export does not create the required enum type e.g. in the following statement

  tipo_empleado ENUM_1 NOT NULL,

ENUM_1 is undefined

EXPECTED RESULT
The exporter should add the enum type e.g. 

CREATE TYPE ENUM_1 AS ENUM ('Supervisor', 'Empleado', 'Obrero', 'Menor');
CREATE TABLE empleado (
  tipo_empleado ENUM_1 NOT NULL,
);
Comment 1 Ralf Habacker 2018-11-08 14:20:01 UTC
Git commit df4a989714be79334fdc7425274fdc7027eca156 by Ralf Habacker.
Committed on 08/11/2018 at 13:15.
Pushed by habacker into branch 'master'.

Missing CREATE TYPE statement for exporting enums for postresql fixed
FIXED-IN:2.26.80 (KDE Applications 16.11.80)

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

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