Request for feature: "UNALTER code"

Jelmer's profile image Jelmer posted 3 years ago in Feature discussion Permalink

Hi there, and thanks again Ansgar!

In our larger projects, we rely heavily on migrations to commit database changes to our repo. I usually copy the "ALTER code" tab just before saving the changes, and paste this in the SQL for an UP migration. This works fine, finetuning changes I can handle manually in the SQL, and as I understand it, the trouble with database names in foreign keys in the ALTER code is fixed (hopefully).

But the DOWN migration is harder. This isn't fun work, because, well, you hardly ever will use this down migration. Still it is good practice, I guess, to have it. So, here's my feature request: how hard would it be to create a tab with UNALTER code: the SQL needed to go back from the edited version of the table to the saved version.

It would help me out, but maybe I'm the only one. In that case I will keep creating it myself.

Thanks, Jelmer

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