pods_apiv1.sql 1.38 KB
Newer Older
David Morley's avatar
David Morley committed
1 2 3
DROP TABLE pods_apiv1;
CREATE TABLE pods_apiv1 AS SELECT * FROM pods;

David Morley's avatar
David Morley committed
4
ALTER TABLE pods_apiv1 ADD Hgitdate text, ADD Hgitref text, ADD Hruntime text, ADD Hencoding text, ADD longversion text, ADD ptr text, ADD whois text, ADD postalcode text, ADD connection text, ADD pingdomlast text, ADD adminrating decimal, ADD hidden boolean, ADD secure boolean;
David Morley's avatar
David Morley committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

ALTER TABLE pods_apiv1 RENAME COLUMN stats_apikey TO pingdomurl;
ALTER TABLE pods_apiv1 RENAME COLUMN service_xmpp TO xmpp;
ALTER TABLE pods_apiv1 RENAME COLUMN uptime_alltime TO uptimelast7;
ALTER TABLE pods_apiv1 RENAME COLUMN latency TO responsetimelast7;

ALTER TABLE pods_apiv1 RENAME COLUMN date_updated TO dateUpdated;
ALTER TABLE pods_apiv1 RENAME COLUMN date_laststats TO dateLaststats;
ALTER TABLE pods_apiv1 RENAME COLUMN date_created TO dateCreated;



ALTER TABLE pods_apiv1 ALTER COLUMN ipv6 TYPE text USING ipv6::text;
ALTER TABLE pods_apiv1 ALTER hidden DROP DEFAULT;
ALTER TABLE pods_apiv1 ALTER COLUMN hidden TYPE text USING hidden::text;
ALTER TABLE pods_apiv1 ALTER COLUMN secure TYPE text USING secure::text;
ALTER TABLE pods_apiv1 ALTER COLUMN signup TYPE text USING signup::text;
ALTER TABLE pods_apiv1 ALTER COLUMN responsetimelast7 TYPE text USING responsetimelast7::smallint;

David Morley's avatar
David Morley committed
24

David Morley's avatar
David Morley committed
25 26 27
ALTER TABLE pods_apiv1 DROP podmin_statement, DROP sslexpire, DROP dnssec, DROP publickey, DROP podmin_notify;

UPDATE pods_apiv1 SET hgitdate = 'unsupported';