DROP TABLE IF EXISTS consumption_energy_measurements;
DROP INDEX IF EXISTS consumption_energy_measurements_pkey;
DROP INDEX IF EXISTS consumption_energy_measurements_measurement_category_idx;
DROP INDEX IF EXISTS consumption_energy_measurements_source_idx;

ALTER TABLE consumption_energy_measurements_old RENAME TO consumption_energy_measurements;
ALTER INDEX consumption_energy_measurements_pkey_old RENAME TO consumption_energy_measurements_pkey;
ALTER INDEX consumption_energy_measurements_measurement_category_idx_old RENAME TO consumption_energy_measurements_measurement_category_idx;
ALTER INDEX consumption_energy_measurements_source_idx_old RENAME TO consumption_energy_measurements_source_idx;
