I have 2 schemas in a database about the same application (Different versions)
我在一个数据库中有两个模式关于相同的应用程序(不同的版本)
I want to generate a Delta script with the differences
我想生成带有差异的Delta脚本
It exists some tool that helps me (Open source solution should be perfect)
它存在一些帮助我的工具(开源解决方案应该是完美的)
Thank you
谢谢你!
5 个解决方案
#1
1
Navicat for MySQL does this with its "Structure Synchronization" tool, but it is not open source (US$179). It will compare tables showing you all the differences and also provide you with the SQL to sync them up.
MySQL的Navicat用它的“结构同步”工具做到了这一点,但它不是开源的(179美元)。它将比较显示所有差异的表,并提供SQL来同步它们。
There is a free 30-day trial which you could use to do a quick comparison. Windows, Linux, and Mac versions.
有一个免费的30天试验,你可以用它来做一个快速的比较。Windows、Linux和Mac版本。
#2
1
http://sourceforge.net/projects/schema-compare/
http://sourceforge.net/projects/schema-compare/
basic but working
基本但工作
#4
0
Try using dbForge Schema Compare for MySQL. It's not a free tool, though it offers free 30-days trial period.
尝试为MySQL使用dbForge模式比较。它不是一个免费的工具,尽管它提供了免费的30天试用期。
#5
0
Use the below query to generate two .csv
files for both the schema by running the below query twice by changing table_schema
and OUTFILE
then compare both .csv with Beyond Compare or any comparing tool available
使用下面的查询为两个模式生成两个.csv文件,方法是通过两次运行下面的查询,更改table_schemaand OUTFILE,然后将.csv与Beyond compare或任何可用的比较工具进行比较
select
t.TABLE_NAME,c.COLUMN_NAME,t.TABLE_TYPE,c.COLUMN_TYPE,t.ENGINE, t.VERSION, t.TABLE_COLLATION, c.ORDINAL_POSITION, c.COLUMN_DEFAULT, c.IS_NULLABLE, c.DATA_TYPE, c.CHARACTER_MAXIMUM_LENGTH, c.NUMERIC_PRECISION, c.CHARACTER_SET_NAME, c.COLLATION_NAME, c.COLUMN_KEY, c.EXTRA, c.PRIVILEGES
from
information_schema.columns c, information_schema.tables t where t.table_schema = **‘schema_name1’** and t.table_schema = c.table_schema and t.TABLE_NAME = c.TABLE_NAME order by 1,2
INTO OUTFILE **'C:/ARUN/temp2/va_empty_db_2_info.csv'** FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'
#1
1
Navicat for MySQL does this with its "Structure Synchronization" tool, but it is not open source (US$179). It will compare tables showing you all the differences and also provide you with the SQL to sync them up.
MySQL的Navicat用它的“结构同步”工具做到了这一点,但它不是开源的(179美元)。它将比较显示所有差异的表,并提供SQL来同步它们。
There is a free 30-day trial which you could use to do a quick comparison. Windows, Linux, and Mac versions.
有一个免费的30天试验,你可以用它来做一个快速的比较。Windows、Linux和Mac版本。
#2
1
http://sourceforge.net/projects/schema-compare/
http://sourceforge.net/projects/schema-compare/
basic but working
基本但工作
#3
#4
0
Try using dbForge Schema Compare for MySQL. It's not a free tool, though it offers free 30-days trial period.
尝试为MySQL使用dbForge模式比较。它不是一个免费的工具,尽管它提供了免费的30天试用期。
#5
0
Use the below query to generate two .csv
files for both the schema by running the below query twice by changing table_schema
and OUTFILE
then compare both .csv with Beyond Compare or any comparing tool available
使用下面的查询为两个模式生成两个.csv文件,方法是通过两次运行下面的查询,更改table_schemaand OUTFILE,然后将.csv与Beyond compare或任何可用的比较工具进行比较
select
t.TABLE_NAME,c.COLUMN_NAME,t.TABLE_TYPE,c.COLUMN_TYPE,t.ENGINE, t.VERSION, t.TABLE_COLLATION, c.ORDINAL_POSITION, c.COLUMN_DEFAULT, c.IS_NULLABLE, c.DATA_TYPE, c.CHARACTER_MAXIMUM_LENGTH, c.NUMERIC_PRECISION, c.CHARACTER_SET_NAME, c.COLLATION_NAME, c.COLUMN_KEY, c.EXTRA, c.PRIVILEGES
from
information_schema.columns c, information_schema.tables t where t.table_schema = **‘schema_name1’** and t.table_schema = c.table_schema and t.TABLE_NAME = c.TABLE_NAME order by 1,2
INTO OUTFILE **'C:/ARUN/temp2/va_empty_db_2_info.csv'** FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'