diff --git a/sql/upgrade/3.0/README.rst b/sql/upgrade/3.0/README.rst index e4ed23f9f9..39f1743a6f 100644 --- a/sql/upgrade/3.0/README.rst +++ b/sql/upgrade/3.0/README.rst @@ -7,7 +7,10 @@ No Bug Add function for middleware to retrieve lists of product_versions from the DB. +729208 + Drop redundant build_date column from reports. + ... -The above changes should take only a few minutes to deploy. -This upgrade does not require a downtime. \ No newline at end of file +Bug 729208 may require locking on reports, and thus require a brief (5 minutes) processor downtime. +Aside from locking, neither should take more than a couple minutes to run. \ No newline at end of file diff --git a/sql/upgrade/3.0/drop_reports_build_date.sql b/sql/upgrade/3.0/drop_reports_build_date.sql new file mode 100644 index 0000000000..35fa64560d --- /dev/null +++ b/sql/upgrade/3.0/drop_reports_build_date.sql @@ -0,0 +1,10 @@ +\set ON_ERROR_STOP 1 + +DO $f$ +BEGIN + +PERFORM try_lock_table('reports','ACCESS EXCLUSIVE'); + +ALTER TABLE reports DROP COLUMN build_date; + +END;$f$; \ No newline at end of file diff --git a/sql/upgrade/3.0/upgrade.sh b/sql/upgrade/3.0/upgrade.sh index 5161719f30..145c9491e3 100755 --- a/sql/upgrade/3.0/upgrade.sh +++ b/sql/upgrade/3.0/upgrade.sh @@ -15,6 +15,11 @@ echo 'add middleware function for retrieving lists of product-versions' echo 'no bug' psql -f ${CURDIR}/get_product_version_ids.sql breakpad +echo '*********************************************************' +echo 'drop build_date column from reports' +echo 'bug #729208' +psql -f ${CURDIR}/drop_reports_build_date.sql breakpad + #change version in DB psql -c "SELECT update_socorro_db_version( '$VERSION' )" breakpad