-- SQL script to rename EDI columns from uppercase to lowercase
-- This script is used during the migration process to handle case sensitivity issues

ALTER TABLE CLAIM RENAME COLUMN "EDI" TO edi;
ALTER TABLE CLAIMH RENAME COLUMN "EDI" TO edi;
ALTER TABLE ELMAH$ERROR RENAME COLUMN "ERRORID" TO errorid;
ALTER TABLE FACILITY RENAME COLUMN "NPI" TO npi;
ALTER TABLE PAFILES RENAME COLUMN "PAFILESID" TO pafilesid;
ALTER TABLE PAFILES RENAME COLUMN "FILEMIME" TO filemime;
ALTER TABLE PAFILES RENAME COLUMN "CREATEDATE" TO createdate;
ALTER TABLE PAFILES RENAME COLUMN "FILENAME" TO filename;
ALTER TABLE PAFILES RENAME COLUMN "DIMENSION" TO dimension;
ALTER TABLE PANAVCONTENT RENAME COLUMN "PANAVCONTENTID" TO panavcontentid;
ALTER TABLE PANAVCONTENT RENAME COLUMN "PANAVCONTENTNAME" TO panavcontentname;
ALTER TABLE PANAVCONTENT RENAME COLUMN "PANAVCONTENTTYPE" TO panavcontenttype;
ALTER TABLE PATEMPLATE RENAME COLUMN "PATEMPLATEID" TO patemplateid;
ALTER TABLE PATEMPLATE RENAME COLUMN "PATEMPLATENAME" TO patemplatename;
ALTER TABLE PRACTICE RENAME COLUMN "NPI" TO npi;
ALTER TABLE PRODUCER RENAME COLUMN "CDA" TO cda;
ALTER TABLE PTALERT RENAME COLUMN "NDCID" TO ndcid;
ALTER TABLE INSURANC RENAME COLUMN "EDI" TO edi;
ALTER TABLE INSURANC RENAME COLUMN "NPI" TO npi;
ALTER TABLE INSURANC RENAME COLUMN "CIF" TO cif;
ALTER TABLE PTALERTH RENAME COLUMN "NDCID" TO ndcid;
ALTER TABLE TRX RENAME COLUMN "EDI" TO edi;
ALTER TABLE USERS RENAME COLUMN "PIN" TO pin;
ALTER TABLE USERSHIS RENAME COLUMN "PIN" TO pin;
ALTER TABLE XRAYINFO RENAME COLUMN "PA" TO pa;
ALTER TABLE XRAYINFO RENAME COLUMN "FMX" TO fmx;