This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 127878 - Removing a column which is a part of primary key does not reflect the SQL code for table creation
Summary: Removing a column which is a part of primary key does not reflect the SQL cod...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P2 blocker (vote)
Assignee: David Vancouvering
URL: http://img524.imageshack.us/img524/20...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 14:33 UTC by antondj
Modified: 2008-02-29 04:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
A screenshot of the issue (88.74 KB, image/jpeg)
2008-02-20 14:35 UTC, antondj
Details

Note You need to log in before you can comment on or make changes to this bug.
Description antondj 2008-02-20 14:33:11 UTC
When a colum is deleted in a Create Table window during the table creation, resulting SQL (intended to create the 
table) is not properly updated. It still contains the reference(s) to columns removed using the Remove button. A 
screenshot depicting this error is available for viewing in the URL field attached to this report. A feature which 
would enable the developer to change the resulting SQL prior to execution on the DBMS would provide a suitable 
workaround in this kind of situation.
Comment 1 antondj 2008-02-20 14:35:48 UTC
Created attachment 56927 [details]
A screenshot of the issue
Comment 2 antondj 2008-02-20 14:37:05 UTC
URL updated. Attachment included.
Comment 3 David Vancouvering 2008-02-20 15:24:04 UTC
It looks like the issue might be if the column that was removed is part of the primary key...  Let me see if I can
reproduce.  Isn't the workaround to delete the table and try again?  I know it's not a *nice* workaround but a P1 means
that the feature is broken and there is non workaround; P2 means that it's broken but there is a (painful) workaround.
Comment 4 David Vancouvering 2008-02-20 15:28:19 UTC
I was able to reproduce.  I can remove a column that is not part of the primary key, but if the column has been marked
as part of the primary key, I get the failure seen by antondj.

Downgrading to a P2 as the workaround is to cancel the Create Table dialog and then run Create Table... again
Comment 5 antondj 2008-02-20 15:31:57 UTC
Yes, that was a workaround although it would be very nice to be able to edit SQL directly prior to execution, but that's
a feature not a bug. Anyway, I apologize for not being fully aware of the priority system. Thanks for an instant response.
Comment 6 antondj 2008-02-20 15:37:19 UTC
I also updated the summary to better reflect the issue.
Comment 7 David Vancouvering 2008-02-29 04:36:16 UTC
http://hg.netbeans.org/main?cmd=changeset;node=022b12e8d065