Export in .sql without heidi version

roxwal's profile image roxwal posted 9 years ago in Import/Export Permalink
hi,
i use the sql Export to keep svn record of the structure changes.

my problem is if the heidisql version change all file is marked as changed
[See attach]

could you add an option to exlude version of heidi in .sql file?

thk in advance
1 attachment(s):
  • Diff-example
ansgar's profile image ansgar posted 9 years ago Permalink
I'm thinking to add some drop down button labelled "Options" to that dialog, and to add some checkboxes or clickable menu items there. "Add header comments" and "Table comments" could be the first items to live there.

The thing is I want this dialog to be easy as it can be, so especially newbies don't fear to do something wrong when they use it. I got tons of questions here whether I can add this or that option, and most of the time it was some very special thing, something which only very few users would have benefit from. I think the option you're describing is also such a special thing, although I quite understand your problem.
kalvaro's profile image kalvaro posted 9 years ago Permalink
The potentially unwanted stuff also includes auto_increment counts, as in:

CREATE TABLE `foo` (
-- ...
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=85001


I was faced to the same need years ago and I eventually wrote an ungly custom PHP script to dump the database in a version-control friendly way, with the added benefit of being easily configurable and scriptable (and more reliable than having to remember to check this and that checkboxes every time).

Would it be a good idea to have a "Saved export profiles" feature?
roxwal's profile image roxwal posted 9 years ago Permalink
to solve the newbies problem,

add a select box where user can select:
full format
no version format
no version and Auto_increment

and a mini preview box dummy with example of exported file format




Code modification/commit c7ad2b7 from ansgarbecker, 9 years ago, revision 9.3.0.5041
Add new "Options" dropdown button on SQL export dialog, and two new true/false settings: "Add comments" and "Remove auto_increment clauses".
* see http://www.heidisql.com/forum.php?t=18727#p18729
* see http://www.heidisql.com/forum.php?t=20363#p20373
ansgar's profile image ansgar posted 9 years ago Permalink

See the new "Options" dropdown button in r5041

roxwal's profile image roxwal posted 9 years ago Permalink

thank you very much

Please login to leave a reply, or register at first.