App-DiffDBSchemaUtils
view release on metacpan or search on metacpan
Diff two database schemas.
This function is not exported.
Arguments ('*' denotes required arguments):
* dsn1* => *str*
* dsn2* => *str*
* password1 => *str*
* password2 => *str*
* username1 => *str*
* username2 => *str*
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
Arguments ('*' denotes required arguments):
* db1* => *str*
Name of the first MySQL database.
* db2* => *str*
Name of the second MySQL database.
* password1 => *str*
* password2 => *str*
* username1 => *str*
* username2 => *str*
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
Arguments ('*' denotes required arguments):
* db1* => *str*
Name of the first PostgreSQL database.
* db2* => *str*
Name of the second PostgreSQL database.
* password1 => *str*
* password2 => *str*
* username1 => *str*
* username2 => *str*
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
Arguments ('*' denotes required arguments):
* db1* => *str*
Name of the first PostgreSQL database.
* db2* => *str*
Name of the second PostgreSQL database.
* password1 => *str*
* password2 => *str*
* username1 => *str*
* username2 => *str*
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
dsn1 => {
schema => 'str*',
req => 1,
pos => 0,
tags => ['category:db-connection'],
},
username1 => {
schema => 'str*',
tags => ['category:db-connection'],
},
password1 => {
schema => 'str*',
tags => ['category:db-connection'],
},
dsn2 => {
schema => 'str*',
req => 1,
pos => 1,
tags => ['category:db-connection'],
},
username2 => {
schema => 'str*',
tags => ['category:db-connection'],
},
password2 => {
schema => 'str*',
tags => ['category:db-connection'],
},
);
our %args_dbconnect_mysql = %args_dbconnect;
delete $args_dbconnect_mysql{dsn1};
delete $args_dbconnect_mysql{dsn2};
%args_dbconnect_mysql = (
%args_dbconnect_mysql,
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
# args => {
# %args_dbconnect,
# },
#};
#sub dump_db_schema {
# require DBIx::Connect::Any;
#
# my %args = @_;
#
# my $dbh = DBIx::Connect::Any->connect(
# $args{dsn}, $args{username}, $args{password},
# {RaiseError=>1});
#
#}
$SPEC{diff_db_schema} = {
v => 1.1,
summary => 'Diff two database schemas',
args => {
%args_dbconnect,
},
};
sub diff_db_schema {
require DBIx::Connect::Any;
my %args = @_;
my $dbh1 = DBIx::Connect::Any->connect(
$args{dsn1}, $args{username1}, $args{password1},
{RaiseError=>1});
my $dbh2 = DBIx::Connect::Any->connect(
$args{dsn2}, $args{username2}, $args{password2},
{RaiseError=>1});
require DBIx::Diff::Schema;
my $res = DBIx::Diff::Schema::diff_db_schema($dbh1, $dbh2);
[200, "OK", $res];
}
$SPEC{diff_mysql_schema} = {
v => 1.1,
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
This function is not exported.
Arguments ('*' denotes required arguments):
=over 4
=item * B<dsn1>* => I<str>
=item * B<dsn2>* => I<str>
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
=back
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
=over 4
=item * B<db1>* => I<str>
Name of the first MySQL database.
=item * B<db2>* => I<str>
Name of the second MySQL database.
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
=back
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
=over 4
=item * B<db1>* => I<str>
Name of the first PostgreSQL database.
=item * B<db2>* => I<str>
Name of the second PostgreSQL database.
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
=back
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code
lib/App/DiffDBSchemaUtils.pm view on Meta::CPAN
=over 4
=item * B<db1>* => I<str>
Name of the first PostgreSQL database.
=item * B<db2>* => I<str>
Name of the second PostgreSQL database.
=item * B<password1> => I<str>
=item * B<password2> => I<str>
=item * B<username1> => I<str>
=item * B<username2> => I<str>
=back
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code
script/diff-db-schema view on Meta::CPAN
C<*> marks required options.
=head2 Db connection options
=over
=item B<--dsn1>=I<s>*
=item B<--dsn2>=I<s>*
=item B<--password1>=I<s>
=item B<--password2>=I<s>
=item B<--username1>=I<s>
=item B<--username2>=I<s>
=back
=head2 Output options
=over
script/diff-mysql-schema view on Meta::CPAN
=over
=item B<--db1>=I<s>*
Name of the first MySQL database.
=item B<--db2>=I<s>*
Name of the second MySQL database.
=item B<--password1>=I<s>
=item B<--password2>=I<s>
=item B<--username1>=I<s>
=item B<--username2>=I<s>
=back
=head2 Output options
=over
script/diff-pg-schema view on Meta::CPAN
=over
=item B<--db1>=I<s>*
Name of the first PostgreSQL database.
=item B<--db2>=I<s>*
Name of the second PostgreSQL database.
=item B<--password1>=I<s>
=item B<--password2>=I<s>
=item B<--username1>=I<s>
=item B<--username2>=I<s>
=back
=head2 Output options
=over
script/diff-sqlite-schema view on Meta::CPAN
=over
=item B<--db1>=I<s>*
Name of the first PostgreSQL database.
=item B<--db2>=I<s>*
Name of the second PostgreSQL database.
=item B<--password1>=I<s>
=item B<--password2>=I<s>
=item B<--username1>=I<s>
=item B<--username2>=I<s>
=back
=head2 Output options
=over
( run in 0.865 second using v1.01-cache-2.11-cpan-49f99fa48dc )