views:

445

answers:

2

I'm trying to use SVN with Toad for MySQL to keep two DBs on two development machines in sync. When I modify a table on one machine Toad changes the appropriate scripts and checks them in just fine.

On the other machine, when I try "Update database" or "Updata schema" or even "Get Latest" on the specific table, I get a window which shows that the table has changed, but when I click OK I get an empty script window that says -- no changes detected (and the OK button is disabled). When I try to alter the table manually, Toad says that it doesn't match with SVN and wants me to update it, but that just brings me to the first window. And since the first window cannot be closed successfully (it can be only cancelled), I can't even edit the table.

Has anyone had this before? What am I doing wrong?

Added: Another problem: I added a new table on one of the machines. When I try to update the other one, I get MySQL Database Error: Table 'my.table' doesn't exist.

Added 2: Ok, it seems the problem is buggy Toad. Here's something else I found: Even if I use just one machine to modify the DB, it still says to me that I have to update the table or SVN, because they are different (however they can't be different, the only changes I have done is from this machine and they are checked in). If I try to update from SVN, I get the same dead-end dialog. If I update to SVN, then inspecting the changeset with TortoiseSVN reveals one significant change:

Before: ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 After: ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;

This should be pretty self-explanatory. It doesn't explain the "table doesn't exist", but I suspect it's just another bug. The good news - the people from Toad already know about it and say they will fix it for the next release.

A: 

It sounds like one of your machines can use the repository to track db changes just fine but the other is having problems working with your repo. It sounds like your problem machine may have:

  • a different or corrupt svn client.
  • a different or corrupt toad client.
  • a different or corrupt mysql client.
  • a corrupt working copy.

I'd verify the installs/versions, back up your working copy/database, and do a fresh checkout from the repository.

TheDeeno
Actually, I've already determined that it's a bug in Toad. See the post.
Vilx-
A: 

If this is a bug in Toad, you can use another SVN client to manage the checkouts. Use Toad for doing the checkin, but when you check out, quit Toad, and then Toad should read the latest version of the files when you restart it.

It's not very nice, I know, but you can continue working at least.

MatthieuF
That's just the problem. Toad wants an exclusive lock on the file before it allows me to alter the tables. And before it locks the file, it checks whether it shouldn't update it...
Vilx-