DROP VIEW lv_latest_loc;
DROP VIEW lv_latest_conn;
DROP VIEW lv_latest_firmware;
DROP VIEW hv_latest_loc;
DROP VIEW hv_latest_conn;
DROP VIEW hv_latest_firmware;

DROP VIEW err_ni_verbose;
DROP VIEW err_adc_verbose;
DROP VIEW err_mcm_verbose;
DROP VIEW ori_verbose;
DROP VIEW rob_verbose;

DROP VIEW feeservices;
DROP VIEW fee;

DROP FUNCTION generate_series;

DROP TYPE numset_t;

DROP TABLE oricfg;
PURGE TABLE oricfg;
DROP TABLE ori_loc;
PURGE TABLE ori_loc;
DROP TABLE ori;
PURGE TABLE ori;

DROP VIEW cferr_ni_current;
DROP VIEW cferr_adc_current;
DROP VIEW  cferr_mcm_current;

DROP TABLE cferr_adc;
DROP TABLE  cferr_ni;
DROP TABLE cferr_mcm;

DROP TABLE lv_loc;
DROP TABLE lv_bin;
DROP TABLE lv_chan;
DROP TABLE lv;
DROP TABLE hv_loc;
DROP TABLE hv;

DROP TABLE oricfg;
DROP TABLE ori;
DROP TABLE mcm;
DROP TABLE rob;
DROP TABLE roc;
DROP TABLE sm;

DROP FUNCTION get_curr_ver_id;

DROP SEQUENCE cfdat_config_id_seq;
DROP SEQUENCE cfdat_script_id_seq;
DROP SEQUENCE cfdat_version_id_seq;

DROP TABLE cfdat_tag;
DROP TABLE cfdat_command;
DROP TABLE cfdat_config_scripts;
DROP TABLE cfdat_script;
DROP TABLE cfdat_config;
DROP TABLE cfdat_version;

DROP TABLE mcm_loc;
PURGE TABLE mcm_loc;
DROP TABLE mcm;
PURGE TABLE mcm;
DROP TABLE rob_loc;
PURGE TABLE rob_loc;
DROP TABLE rob;
PURGE TABLE rob;
DROP TABLE roc_loc;
PURGE TABLE roc_loc;
DROP TABLE roc;
PURGE TABLE roc;
DROP TABLE sm_loc;
PURGE TABLE sm_loc;
DROP TABLE sm;
PURGE TABLE sm;

DROP TABLE lv_firmware;
DROP TABLE lv_conn;
DROP TABLE lv_loc;
DROP TABLE lv_chan;
DROP TABLE lv_bin;
DROP TABLE lv_psu;
DROP TABLE hv_firmware;
DROP TABLE hv_conn;
DROP TABLE hv_loc;
DROP TABLE hv_psu;
PURGE TABLE lv_psu;
PURGE TABLE lv_firmware;
PURGE TABLE lv_bin;
PURGE TABLE lv_chan;
PURGE TABLE lv_loc;
PURGE TABLE lv_conn;
PURGE TABLE hv_psu;
PURGE TABLE hv_firmware;
PURGE TABLE hv_loc;
PURGE TABLE hv_conn;
