<reponame>Jefro/open-smart-grid-platform<filename>osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/src/main/resources/db/migration/V20200527093141762__Change_default_device_type.sql
DO $$
BEGIN

  ALTER TABLE iec60870_device ALTER COLUMN device_type SET DEFAULT 'DISTRIBUTION_AUTOMATION_DEVICE';
  UPDATE iec60870_device SET device_type = 'DISTRIBUTION_AUTOMATION_DEVICE' WHERE device_type = 'DA_DEVICE';

END$$;
