From 08b8c7c3072950f8df404af39295c94366f706d7 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 23 May 2016 13:31:07 -0700 Subject: [PATCH] bin/regen.sh - Drop-create table `zipcodes` The original `regen.sh` script drops the table `zipcodes` after creating it. That works fine in normal execution (when `regen.sh` finishes without erorr). But if there is an error, then the table gets left in the DB -- and creates a conflict when you try re-run `regen.sh`. This patch does a 'drop-create' so that subsequent runs will work despite a previous error. --- bin/regen.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/regen.sh b/bin/regen.sh index 854bd98ace..8b2a781130 100755 --- a/bin/regen.sh +++ b/bin/regen.sh @@ -39,6 +39,7 @@ echo "SELECT table_name FROM information_schema.TABLES WHERE TABLE_SCHEMA='${DB $MYSQLCMD < civicrm.mysql $MYSQLCMD < civicrm_data.mysql $MYSQLCMD < civicrm_sample.mysql +echo "DROP TABLE IF EXISTS zipcodes" | $MYSQLCMD $MYSQLCMD < zipcodes.mysql php GenerateData.php -- 2.25.1