From d5612efe0a130a6a3ec401b65b342855ae5436e5 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Fri, 2 Nov 2012 09:39:05 -0700 Subject: [PATCH] Properly check for presence of old bucardo_sequences table. `$count` will be true if it exists, and false if it does not. The issue was not to do with `execute()`, as I originally thought; @machack666 was right about that. Resolves #31. --- bucardo.schema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucardo.schema b/bucardo.schema index 631e7b640..10ecbf2bd 100644 --- a/bucardo.schema +++ b/bucardo.schema @@ -1894,7 +1894,7 @@ SELECT 'Fixme'::TEXT; .q{ WHERE n.oid = c.relnamespace AND n.nspname = 'bucardo' } .q{ AND c.relname = 'bucardo_sequences')}; $count = $dbh->selectall_arrayref($SQL)->[0][0]; - if ($count < 1) { + if ($count) { warn "Dropping older version of bucardo_sequences, then recreating empty\n"; $dbh->do('DROP TABLE bucardo.bucardo_sequences'); } -- 2.39.5