From 686c58afea30ebc8ba5d9ff2a44c7752df0e2510 Mon Sep 17 00:00:00 2001 From: abijah Date: Wed, 8 Jul 2009 21:25:07 +0000 Subject: [PATCH] Modified the sitelink2pmgr script to print debug information about where it's connecting, and to no longer have schema.sql reference the database. This will create an issue if we delete tables from the file, but we'll deal with that as it comes. git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@264 97e9348a-65ac-dc4b-aefc-98561f571b83 --- db/schema.sql | 9 ++++++--- scripts/sitelink2pmgr.pl | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/db/schema.sql b/db/schema.sql index 4c354a1..596a1ba 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -22,9 +22,12 @@ -- may have to move this logic into the application :-/ -DROP DATABASE IF EXISTS `property_manager`; -CREATE DATABASE `property_manager`; -USE `property_manager`; +-- REVISIT : 20090511 +-- By not specifying the database, the script can +-- make the determination of which one to use. +-- DROP DATABASE IF EXISTS `property_manager`; +-- CREATE DATABASE `property_manager`; +-- USE `property_manager`; -- ###################################################################### diff --git a/scripts/sitelink2pmgr.pl b/scripts/sitelink2pmgr.pl index fd1288f..e84b47c 100644 --- a/scripts/sitelink2pmgr.pl +++ b/scripts/sitelink2pmgr.pl @@ -26,6 +26,7 @@ my $sdbh = DBI->connect("dbi:ADO:$sdsn", undef, undef, {PrintError => 1, my($hostname, $database, $user, $password) = ('localhost', 'property_manager', 'pmgr', 'pmgruser'); +print STDERR "Connecting to $database as $user\n"; my $db_handle = DBI->connect("DBI:mysql:database=$database;host=$hostname", $user, $password, {'PrintError' => 1,