Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> "migration commands based on the git history"... what does that even mean?

It actually seems like a really cool idea. E.g.

* Commit A: create a schema.sql file "create table t (a INT);"

* Commit B: update the schema.sql to "create table t (a INT, b INT);"

* The tool can generate a migration from A..B "alter table t add column b INT;"

It seems like it probably would work really well for creating new tables and columns in simple projects. In more complex projects I've worked on, we usually had more complicated migrations to update the data to fit the new schema, and we often had to be careful to interleave schema, data and code updates (especially if you wanted to be able to rollback).



Automatic migrations using only source-code snapshots don’t work for things like column renames or splitting/combining columns. Every tool I’ve used requires some migration metadata.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: