Fix Workplace Attendant DB for Upgrade

PGSQL Login

psql -p 5433 -U hadb -d attendant_attendantdb
select * from db_instance ;

#Manual Schema Update:

UPDATE db_instance SET schema_version = '4-2-0' where name='attendant_attendantdb';

Normally not used!

IF Schema Version 2-0-11:

UPDATE public.tbl_external_db SET db_id = '1' where db_id='0';
ALTER TABLE tbl_statisticdata_daily drop column if exists outgoingcalls cascade;
DROP Table tbl_geo_replication_failed;
DROP INDEX tbl_attduser_columns_attidviewid;
DROP INDEX tbl_attendant_users_callnumber;
DROP INDEX callstarttime_day;
DROP INDEX tbl_dictionary_businessphone1_u;
DROP INDEX tbl_notes_e164number;
DROP INDEX tbl_numbercache_shadownumber;
DROP INDEX tbl_numbercache_shadownumber_fiid3;
DROP INDEX tbl_operatorhistory_usr_id;
DROP INDEX tbl_speeddial_userid;
DROP INDEX topic_callstarttime_day;
DROP INDEX tbl_topic_history_callsessionid;