Bug 362244 - Generated SQL incomplete due to CHECK constraints not being terminated with ;
Summary: Generated SQL incomplete due to CHECK constraints not being terminated with ;
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: 2.18.3 (KDE Applications 15.12.3)
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-25 14:27 UTC by Matthew Wild
Modified: 2016-04-25 14:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.19.1 (KDE Applications 16.04.1)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Wild 2016-04-25 14:27:50 UTC
When generating SQL form an ERD using the PostgreSQL or MySQL code generator, the resultant SQL file is wrong if a table contains a CHECK constraint. The ALTER TABLE command is correctly generated but the line is not ended with a ; and therefore will fail when pushed to the database.

Reproducible: Always

Steps to Reproduce:
1. Create ERD
2. Create Table
3. Create CHECK constraint on field within table
4. Generate PostgreSQL/MySQL code

Actual Results:  
-- 
ALTER TABLE SSA_Sensor_Site ADD CONSTRAINT range_check_constraint CHECK (Range>=0)


Expected Results:  
-- 
ALTER TABLE SSA_Sensor_Site ADD CONSTRAINT range_check_constraint CHECK (Range>=0);
Comment 1 Matthew Wild 2016-04-25 14:29:29 UTC
Sorry, meant to say this is against version 2.18.3 of Unmbrello which wasn't on the list of options in the bug form.
Comment 2 Ralf Habacker 2016-04-25 14:52:47 UTC
Git commit 067044d982e96500b55b574df032e10c8234a38b by Ralf Habacker.
Committed on 25/04/2016 at 14:43.
Pushed by habacker into branch 'Applications/16.04'.

Fix 'Generated SQL incomplete due to CHECK constraints not being terminated with ;'.
FIXED-IN:2.19.1 (KDE Applications 16.04.1)

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

http://commits.kde.org/umbrello/067044d982e96500b55b574df032e10c8234a38b