START TRANSACTION;
DROP TABLE IF EXISTS DICOM_SETTINGS;

ALTER TABLE dicom_series ALTER COLUMN series_number TYPE integer USING (trim(series_number)::integer);
ALTER TABLE dicom_objects ALTER COLUMN object_number TYPE integer USING (trim(object_number)::integer);
ALTER TABLE dicom_ae_title DROP COLUMN port_secure;

COMMIT;
