Generate "alter" SQL for database compare?

I just discovered the database diff feature in PhpStorm; pretty sweet! I think it found the problem I was having.

Doesn't look fully fleshed out though; it looks like it's generating the create SQL and then just running a text diff on that? Perhaps it should do a diff based on the names of the fields, and their types, and defaults, and properties separetely. For example, I've got a field here that exists in both tables, the only thing that differs is that one is a tinyint, and the other is a bit, but the way it highlights it doesn't make it very clear. Perhaps I just want to see which fields are completely missing, or which have the wrong type.

But that's besides the point...what I really wanted was it to generate some "alter table" SQL so I could sync them up. Does this exist? Is it in the works?

Edit: Actually, is it even reporting the types correctly? How does it generate this create SQL? Because we never use bits here, and that's not what phpMyAdmin is reporting either...

2 comments
Comment actions Permalink

For syncing schemas, I highly recommend SQLyog.

Though, I agree, it'd be nice if PHPStorm added that feature.

0
Comment actions Permalink

Feel free to create a feature request at http://youtrack.jetbrains.net/ for this.

0

Please sign in to leave a comment.