I am converting "timestamps without timezone" columns to "timestamps with timezone" on a number of tables. These are large tables and I am going to use batching and other approaches to reduce the time the tables are exclusively locked while data is converted.
Once this procedure is complete, I want to follow up with an application deploy, that uses migration scripts to keep the schema in sync.
When these scripts run I want to check if a column type is already "timezone with timestamp before altering it"?
How can I conditionally carry out the alteration based on a column type check and skip it if it is already a certain type?