Commit aed7f4e4 authored by Leo Gordon's avatar Leo Gordon
Browse files

renamed db_conn.pl to db_cmd.pl to avoid the name clash with already existing term

parent 8139d0a3
......@@ -106,7 +106,7 @@ sub new {
|| die "DB($url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version' but the code is already '$code_sql_schema_version'.\n"
."Unfortunately we cannot patch the database; you may have to create a new database or agree to run older code\n";
my $patcher_command = "$ENV{'EHIVE_ROOT_DIR'}/scripts/db_conn.pl -url $url";
my $patcher_command = "$ENV{'EHIVE_ROOT_DIR'}/scripts/db_cmd.pl -url $url";
die "DB($url) sql_schema_version mismatch: the database's version is '$db_sql_schema_version' but the code is already '$code_sql_schema_version'.\n"
."Please upgrade the database by applying the following patches:\n\n".join("\n", map { "\t$patcher_command < $_" } @$new_patches)."\n\nand try again.\n";
......
......@@ -126,8 +126,8 @@ sub pipeline_create_commands {
my $driver = $self->o($db_conn, '-driver');
my $db_execute_prefix = 'db_conn.pl -url '.$self->dbconn_2_url( $db_conn, 0 ).' -sql ';
my $db_connect_prefix = 'db_conn.pl -url '.$self->dbconn_2_url( $db_conn );
my $db_execute_prefix = 'db_cmd.pl -url '.$self->dbconn_2_url( $db_conn, 0 ).' -sql ';
my $db_connect_prefix = 'db_cmd.pl -url '.$self->dbconn_2_url( $db_conn );
return [
$self->o('hive_force_init') ? ( $db_execute_prefix."'DROP DATABASE IF EXISTS ".$self->o($db_conn, '-dbname')."'" ) : (),
......@@ -678,7 +678,7 @@ sub run {
print "\tgenerate_graph.pl -url $url -out diagram.png\n";
print "\n";
print " # Peek into your pipeline database with a database client (useful to have open while the pipeline is running) :\n";
print "\tdb_conn.pl -url $url\n\n";
print "\tdb_cmd.pl -url $url\n\n";
}
1;
......
......@@ -96,7 +96,7 @@ sub pipeline_create_commands {
@{$self->SUPER::pipeline_create_commands}, # inheriting database and hive tables' creation
# additional tables needed for long multiplication pipeline's operation:
'db_conn.pl -url '.$self->dbconn_2_url('pipeline_db').' -sql '
'db_cmd.pl -url '.$self->dbconn_2_url('pipeline_db').' -sql '
."'CREATE TABLE final_result (a_multiplier char(40) NOT NULL, b_multiplier char(40) NOT NULL, result char(80) NOT NULL, PRIMARY KEY (a_multiplier, b_multiplier))'",
];
}
......
......@@ -94,7 +94,7 @@ sub pipeline_create_commands {
@{$self->SUPER::pipeline_create_commands}, # inheriting database and hive tables' creation
# additional tables needed for long multiplication pipeline's operation:
'db_conn.pl -url '.$self->dbconn_2_url('pipeline_db').' -sql '
'db_cmd.pl -url '.$self->dbconn_2_url('pipeline_db').' -sql '
."'CREATE TABLE final_result (a_multiplier char(40) NOT NULL, b_multiplier char(40) NOT NULL, result char(80) NOT NULL, PRIMARY KEY (a_multiplier, b_multiplier))'",
];
}
......
......@@ -115,26 +115,26 @@ __DATA__
=head1 NAME
db_conn.pl
db_cmd.pl
=head1 SYNOPSIS
db_conn.pl {-url <url> | -reg_conf <reg_conf> -reg_alias <reg_alias> [-reg_type <reg_type>] } [ -sql <sql_command> ] [ -extra <extra_params> ] [ -verbose ]
db_cmd.pl {-url <url> | -reg_conf <reg_conf> -reg_alias <reg_alias> [-reg_type <reg_type>] } [ -sql <sql_command> ] [ -extra <extra_params> ] [ -verbose ]
=head1 DESCRIPTION
db_conn.pl is a generic script that connects you interactively to your database using either URL or Registry and optionally runs an SQL command
db_cmd.pl is a generic script that connects you interactively to your database using either URL or Registry and optionally runs an SQL command
=head1 USAGE EXAMPLES
db_conn.pl -url "mysql://ensadmin:${ENSADMIN_PSW}@localhost:3306/" -sql 'CREATE DATABASE lg4_long_mult'
db_conn.pl -url "mysql://ensadmin:${ENSADMIN_PSW}@localhost:3306/lg4_long_mult"
db_conn.pl -url "mysql://ensadmin:${ENSADMIN_PSW}@localhost:3306/lg4_long_mult" -sql 'SELECT * FROM analysis_base' -extra='--html'
db_cmd.pl -url "mysql://ensadmin:${ENSADMIN_PSW}@localhost:3306/" -sql 'CREATE DATABASE lg4_long_mult'
db_cmd.pl -url "mysql://ensadmin:${ENSADMIN_PSW}@localhost:3306/lg4_long_mult"
db_cmd.pl -url "mysql://ensadmin:${ENSADMIN_PSW}@localhost:3306/lg4_long_mult" -sql 'SELECT * FROM analysis_base' -extra='--html'
db_conn.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias compara_master -reg_type compara
db_conn.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias compara_prev -reg_type compara
db_conn.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias mus_musculus -reg_type core
db_conn.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias squirrel -reg_type core -sql 'SELECT * FROM coord_system'
db_cmd.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias compara_master -reg_type compara
db_cmd.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias compara_prev -reg_type compara
db_cmd.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias mus_musculus -reg_type core
db_cmd.pl -reg_conf ${ENSEMBL_CVS_ROOT_DIR}/ensembl-compara/scripts/pipeline/production_reg_conf.pl -reg_alias squirrel -reg_type core -sql 'SELECT * FROM coord_system'
=head1 CONTACT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment