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 155358 - Export schema to SQL DDL
Summary: Export schema to SQL DDL
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-12 14:52 UTC by Roman Mostyka
Modified: 2016-12-31 01:50 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-12-12 14:52:57 UTC
Export schema to SQL DDL.
Comment 1 Jiri Rechtacek 2009-10-16 14:10:04 UTC
Reassigned to new owner.
Comment 2 paolosca 2010-04-22 11:03:40 UTC
This is this more or less provided by "Show SQL script for CREATE" and "Show SQL script for INSERT" but it would be very comfortable to be able to do it directly from the database tree for selected tables or the whole database.
Comment 3 gery51 2012-11-28 23:42:00 UTC
An Import schema from sql would be very nice too !
Comment 4 Christian Lenz 2016-12-07 14:24:05 UTC
I changed the version to 8.2 because this is still a problem and not implemented yet. I know the context menu "grab structure" but there are to many steps. Right click on table -> grab structure -> choose a folder where you want to save the table_name.grab file -> e.g. delete the table -> right click on Tables -> Recreate table -> use the grab file and you can edit the SQL DDL. Toooo many steps.

Better:

Right click on table -> grab DDL structure to clipboard (Or whatever) -> you have the SQL DDL statement for creating table in the clipboard. DataGrip, the DB IDE from JetBrains did this and it is very handy.


Regards

Chris
Comment 5 Christian Lenz 2016-12-31 01:50:17 UTC
I'm working on the feature. With my feature it should be possible to rightclick on a table (or more) and then choose "View DDL/SQL". Then a little dialog will open (Like the one for Show SQL script for CREATE" in the result view, but directly in the tree as some mentioned.

I will provide 2 Actions:

"View DDL/SQL -> Will provide the CREATE TABLE SQL statement inside a dialog for one or more tables"

"Copy DDL/SQL -> Will copy the CREATE TABLE SQL statement for one or more tables which you can select inside the Database tree"


Cheers

Chris