From: Chris Sharp Date: Sun, 9 Jan 2022 02:33:32 +0000 (-0500) Subject: check for column existence while dropping X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=420285efbf8fd3032107218ab222d1bb6ab0db02;p=evergreen%2Fpines.git check for column existence while dropping --- diff --git a/Open-ILS/src/sql/Pg/version-upgrade/student_card_updates.sql b/Open-ILS/src/sql/Pg/version-upgrade/student_card_updates.sql index 7315a5a61a..2b168c4e99 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/student_card_updates.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/student_card_updates.sql @@ -1,11 +1,11 @@ begin; -- drop now unused columns -alter table student_card.district drop column ftp_host cascade; -alter table student_card.district drop column ftp_user cascade; -alter table student_card.district drop column ftp_pass cascade; -alter table student_card.district drop column ftp_remote_dir cascade; -alter table student_card.district drop column ftp_port cascade; +alter table student_card.district drop column if exists ftp_host cascade; +alter table student_card.district drop column if exists ftp_user cascade; +alter table student_card.district drop column if exists ftp_pass cascade; +alter table student_card.district drop column if exists ftp_remote_dir cascade; +alter table student_card.district drop column if exists ftp_port cascade; -- add new columns alter table student_card.district add column file_dir text;