是否有用于MySQL模式映射和同步的工具。

I'm trying to improve my workflow handling MySQL schemas and migrations. When I'm starting a project from scratch (with PHP, most of the times), I find myself changing my DB schema all the time. I mean: you forgot a field here and there, or you want to remove an unused field.

I was reading a lot about some ORMs, but they seem to add lots of functionality that I don't really need. Overhead is not an option.

So, I was "dreaming" with this, but I don't know if exists, or if it's even possible:

  • Write schemas with YAML like:

    Table:Posts
      id:int
      title:varchar(500)
      content:text
    
  • Run a cli command that generates schema

    $ schema update
    
  • Make changes to your yaml (ex. add a field):

    Table:Posts
      id:int
      title:varchar(500)
      content:text
      published:datetime
    
  • Run cli command again and only ADD COLUMN (doesn't regenerate the whole thing)

    $ schema update
    

Is it possible? Is there a tool like that? I can write SQL, I can write migrations, but I think it would be awesome a tool that "recognizes changes" on my definition, and automatically sync the DB.

Thanks a lot!