One way you could solve this is to conform the column orders between
the two versions.
For example, if one table, t6, has columns id, name, and address and
the same table in the second database is id, address, name, you could
just ALTER the second database t6 table to be id, name, address:
mysql> describe t6;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| id | int(9) | NO | PRI | 0 | |
| address | varchar(32) | YES | | | |
| name | varchar(32) | YES | MUL | | |
+---------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
mysql> alter table t6 change column address address varchar(32) after
name;
Query OK, 0 rows affected (0.02 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> describe t6;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| id | int(9) | NO | PRI | 0 | |
| name | varchar(32) | YES | MUL | | |
| address | varchar(32) | YES | | | |
+---------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
Here is the mysql documentation on ALTER TABLE: http://dev.mysql.com/
doc/refman/5.0/en/alter-table.html
Douglas Sims
[EMAIL PROTECTED]
On Sep 8, 2006, at 12:27 PM, Nikita Tovstoles wrote:
Hi,
I'm diffing two versions of a schema produced using mysqldump and
would like to know if there's a way to make mysqldump sort entries
inside CREATE statements (say alphabetically or in some other way)?
Currently some of the column declarations are juxtaposed between
the versions and thus produce "false" diffs.
Mysql 5.0, InnoDB
thanks a lot
-nikita
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]