Auto Migration Script for a given session

[expired user #10021]'s profile image [expired user #10021] posted 8 years ago in Feature discussion Permalink

usually when developing a lot of changes are made to the db, is it possible for Heidi to group all the alter, create, drop statements in one file at the end of a session so that it can be easily shared with another developer or deployed on a another system.

thank you

1 attachment(s):
  • sample_migration
Xenos's profile image Xenos posted 8 years ago Permalink

I would be interested in such thing too.

IMO, that could be done by allowing a "log export" to a file, filtering the log queries. ie: we may have an option in HeidiSQL to set up where to save the "filtered log" (maybe with date and time placeholder so they won't overwrite each other?). We may also have a list of possible filters, either with a simple regex (like "^CREATE|^ALTER TABLE"), or with series of checkboxes (export SELECT? yes/no export CREATE TABLE? yes/no etc).

This is different from "export as SQL" option we have when right clicking a DB since this existing export will only generate "CREATE TABLE/VIEW", and not the "ALTER TABLE" the logs may contain.

Btw, wogisha, you can still do this on your own by setting "save log to a file" in the options, and then doing a "grep" for "^(CREATE|ALTER)" on this file. But having it integrated in HeidiSQL would be a plus.

[expired user #10021]'s profile image [expired user #10021] posted 8 years ago Permalink

Xenos thank you soo much, this may actually work

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