From: Tim Otten Date: Mon, 23 May 2016 20:31:07 +0000 (-0700) Subject: bin/regen.sh - Drop-create table `zipcodes` X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=08b8c7c3072950f8df404af39295c94366f706d7;p=civicrm-core.git 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. --- 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