2009年3月18日星期三

[PerlChina] Re: 连postgresql,那个模块好呢

先dump出两个库的schema,用SQL::Translator::Diff,生成diff.sql文件,然后导入到新的db中。
再做一遍比较。

碰到个问题,
my ($source_schema, $target_schema) = @_;
use SQL::Translator::Diff;
my $diff = SQL::Translator::Diff->new({
output_db => 'PostgreSQL',
source_schema => $source_schema,
target_schema => $target_schema,
%$options_hash,
})->compute_differences->produce_diff_sql;
输出

Can't call method "get_tables" without a package or object reference at /usr/local/share/perl/5.8.8/SQL/Translator/Diff.pm line 87.

抓狂。。。。。


2009/3/18 Jumping <quzhengping@gmail.com>
连postgresql,做schema比较,用什么模块好呢?
DBIx::Compare ?

--
Best Regards,
Jumping Qu
------
Don't tell me how many enemies we have, but where they are!
(ADV:Perl -- It's like Java, only it lets you deliver on time and under budget.)



--
Best Regards,
Jumping
------
Don't tell me how many enemies we have, but where they are!
(ADV:Perl -- It's like Java, only it lets you deliver on time and under budget.)

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

没有评论: