ALTER TABLE \"VoiceRecordings\" ADD COLUMN calltype integer NOT NULL DEFAULT 0; ALTER TABLE \"VoiceRecordings\" ADD COLUMN group_id integer NOT NULL DEFAULT 0; ALTER TABLE zonename ADD COLUMN sentmsg2 boolean NOT NULL DEFAULT false; ALTER TABLE zonename ADD COLUMN msgbody2 character varying(255) NOT NULL DEFAULT ''; ALTER TABLE speedalarm ADD COLUMN lat double precision NOT NULL DEFAULT 0; ALTER TABLE speedalarm ADD COLUMN lng double precision NOT NULL DEFAULT 0; ALTER TABLE telemetry_history ADD COLUMN lat double precision NOT NULL DEFAULT 0; ALTER TABLE telemetry_history ADD COLUMN lng double precision NOT NULL DEFAULT 0; ALTER TABLE emergalarm ADD COLUMN lat double precision NOT NULL DEFAULT 0; ALTER TABLE emergalarm ADD COLUMN lng double precision NOT NULL DEFAULT 0; ALTER TABLE reports ADD COLUMN latlng boolean NOT NULL DEFAULT false; UPDATE emergalarm SET address='no address' WHERE address = ''; UPDATE telemetry_history SET address='no address' WHERE address = ''; UPDATE speedalarm SET address='no address' WHERE address = ''; ALTER TABLE vehicle ADD COLUMN gps_poor integer NOT NULL DEFAULT 0; ALTER TABLE vehicle ADD COLUMN gps_off integer NOT NULL DEFAULT 0; ALTER TABLE vehicle ADD COLUMN made_off integer NOT NULL DEFAULT 0; UPDATE vehicle SET gps_poor=\"GPS_reporting_interval\"*2, gps_off=\"GPS_reporting_interval\"*4, made_off=\"GPS_reporting_interval\"*10; UPDATE lastpos SET status=0; ALTER TABLE gateways ADD COLUMN peer_id integer NOT NULL DEFAULT 0; ALTER TABLE radio_gw DROP CONSTRAINT unique_radio_gw; ALTER TABLE sms ADD COLUMN lat double precision NOT NULL DEFAULT 0; ALTER TABLE sms ADD COLUMN lng double precision NOT NULL DEFAULT 0; ALTER TABLE sms ADD COLUMN address character varying(255) NOT NULL DEFAULT 'no address'; INSERT INTO emailservice(id, \"user\", pass, enable) VALUES (2,'poll', 'poll', 0); ALTER TABLE zonename ADD COLUMN speed integer NOT NULL DEFAULT 0; ALTER TABLE emailservice ADD COLUMN pop_server text NOT NULL DEFAULT 'pop.gmail.com'; ALTER TABLE emailservice ADD COLUMN pop_port integer NOT NULL DEFAULT 995; ALTER TABLE emailservice ADD COLUMN smtp_server text NOT NULL DEFAULT 'smtp.gmail.com'; ALTER TABLE emailservice ADD COLUMN smtp_port integer NOT NULL DEFAULT 587; ALTER TABLE emailservice ADD COLUMN is_pop_ssl boolean NOT NULL DEFAULT true; ALTER TABLE emailservice ADD COLUMN is_smtp_ssl boolean NOT NULL DEFAULT true; ALTER TABLE emailservice ADD COLUMN last_email_time integer NOT NULL DEFAULT 0;