Looking for DB migration and version control tool

I have searched and searched and then some more.

I haven’t found anything that really integrates well with my workflow. All I see is complex solutions for complex databases but not simple solutions for simple databases.

I’ve checked gh-ost, datical(and liquibase), flyway, sqitch, etc

But I haven’t found anything similar to an agnostic Rails migrations or Fluent Migrator.

Is there anything novel out there that really makes DB migrations and version control a breeze?

Same. Seems I do this every six months or so. It really is the worst part of my workflow.

1 Like

Yeah I was think about this recently. Git versioning is amazing for redundancy and backing up, but the only place I can’t place a .git folder is in my database. 1 false move and my database is nuked (or parts thereof).
So I went on a strong hunt for (semi) automated backup/transfer solutions, but come up real short. I’ve settled on just manually doing it with the free version of MySQLworkbench, their migrator wizard I find pretty simple to use.

1 Like

Actually as we are going forward with the Database Creator, I was researching good projects for database schema maintenance and migrations.

Initially I was attracted by node sequalize but recently discovered http://knexjs.org/

It offers much greater control of migrations and SQL generation.

Maybe you should check it out as well.

2 Likes

If you are planning on knexjs you could also take a look at objection.js which is an ORM built on top of it

It might allow you to speed up development while letting you resort to vanilla knex when needed.

Anyway, migrations in knex seem pretty straightforward. I might give them a shot indeed.

1 Like

Yes I know objection.js as well, but actually sticking to specific ORM will limit our cross portability to different server models and db servers.

That was the issue with sequalize as well.

We can’t make it just as portable for PHP and ASP.NET

So sticking just to Knex will allow us to stay more on SQL level and guaranty portability.

1 Like

Well that would be just an UI for automating the import/export of sql script files and running them in two different environments. Unfortunately it falls a bit short.

I need something that allows me to revert all my code and db schema to a specified commit and be able to run it via command line.

Today I was taking a look at phinx. Which is a migration tool for php. That was before @George mentioned that they are considering knexjs.

And while I wouldn’t have not consider it yesterday because it is too big for what I need(only the migrations) it is now shortlisted as if it’s finally included for the db creation tool it will be easier for me to migrate my migrations in case knexjs finally gets integrated.

Quite meta.

I’m still quietly and eagerly awaiting the DB creator which will make my workflow faster. I was going to ask for advice about how to manage database versioning but it looks like it’s already in the works.

2 Likes