Show HN: DevJoist, database versioning done right
devjoist.com
devjoist.com
EDIT: ah, perhaps this is just for systems that don't have such native schema migration support (e.g. raw PHP apps)? Though I'm still not sure how comfortable I would be separating schema version from deployed code version.
The grand vision is that you won't ever have to write migrations again. You'll just modify your database and DevJoist keeps track of everything. You switch branches and DevJoist knows to update your database environment accordingly.
I think storing a version of your schema in VCS is a great idea and it solves part of the problem. If I need to set up a new dev environment I can just run the full schema and I'm good to go.
Ok so now I've got my new database set up and one of my teammates, Sally, makes a change. She writes a change script and maybe updates the base schema as well. This means that she has to keep track of the changes she's made all along the way (DevJoist does this for you).
But what if another teammate, Joe, also makes a change. Now I've got two change scripts to run, I'm not necessarily sure in what order, and my base schema has a potential conflict. DevJoist won't let you commit a change to the schema unless you've merged in the most recent revision of the schema - and gives you a really slick GUI for doing the merging. The merge tool lets you pick and choose which tables, columns, indexes, column properties etc. you want from each version, and then combines them together.
Kind of long winded - sorry, but does that answer your question at all?
Although I'm not a DB specialist, I have a profound distrust of GUI tools for this sort of thing; they've died and the DB schema work I was doing was entirely borked. This has happened multiple times across multiple tools. I kind of develop an allergy to certain styles of work in consequence. :-)
I know someone who does all his schema work in the DB itself; there's no SCM versioning of the DDL. I don't understand how that's responsible software engineering. No one else can examine the versions, diffs aren't available, there's no record of what it really is, as opposed to the live-coding. (I do a lot of work in Lisp - I learned real quick that you really want files & source control instead of letting things all hang out in the REPL waiting for you to crash it. The database isn't too different in spirit).
Until then I'll just use https://github.com/thuss/standalone-migrations with my non-Rails projects.
Automatic synching of changes with your databases so that when you save a new version, your database environment is automatically updated.
Git-style branching.
Versioning of your data (if you're storing any metadata in your db).