From e62a1324790d411ff97bf728cbf57c2acd04ec00 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Fri, 2 Nov 2012 09:47:14 -0700 Subject: [PATCH] No, really properly check for the old bucarodo_sequences table. The query returns true if the new table is present, not if the old one is present. --- bucardo.schema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bucardo.schema b/bucardo.schema index 7ad5809c7..b329c7226 100644 --- a/bucardo.schema +++ b/bucardo.schema @@ -1893,7 +1893,7 @@ SELECT 'Fixme'::TEXT; .q{ AND attrelid = (SELECT c.oid FROM pg_class c, pg_namespace n } .q{ WHERE n.oid = c.relnamespace AND n.nspname = 'bucardo' } .q{ AND c.relname = 'bucardo_sequences')}; - if ($dbh->selectall_arrayref($SQL)->[0][0]) { + if ($dbh->selectall_arrayref($SQL)->[0][0] < 1) { warn "Dropping older version of bucardo_sequences, then recreating empty\n"; $dbh->do('DROP TABLE bucardo.bucardo_sequences'); $count = 0; -- 2.39.5