migration00001.sql 1.42 KB
Newer Older
1
ALTER TABLE pods ADD terms text, ADD sslexpire timestamp, ADD uptime_custom text, ADD dnssec boolean, ADD masterversion text, ADD shortversion text;
dmorley's avatar
dmorley committed
2 3
ALTER TABLE pods DROP Hgitdate, DROP Hgitref, DROP Hruntime, DROP Hencoding, DROP longversion, DROP ptr, DROP whois, DROP postalcode, DROP connection, DROP pingdomlast;

dmorley's avatar
dmorley committed
4
ALTER TABLE pods RENAME COLUMN pingdomurl TO stats_apikey;
dmorley's avatar
dmorley committed
5 6
ALTER TABLE pods RENAME COLUMN xmpp TO service_xmpp;
ALTER TABLE pods RENAME COLUMN uptimelast7 TO uptime_alltime;
dmorley's avatar
dmorley committed
7
ALTER TABLE pods RENAME COLUMN responsetimelast7 TO responsetime;
dmorley's avatar
dmorley committed
8

dmorley's avatar
dmorley committed
9 10 11 12
ALTER TABLE pods RENAME COLUMN dateUpdated TO date_updated;
ALTER TABLE pods RENAME COLUMN dateLaststats TO date_laststats;
ALTER TABLE pods RENAME COLUMN dateCreated TO date_created;

dmorley's avatar
dmorley committed
13 14 15 16 17 18
ALTER TABLE pods ALTER COLUMN ipv6 TYPE boolean USING ipv6::boolean;
ALTER TABLE pods ALTER hidden DROP DEFAULT;
ALTER TABLE pods ALTER COLUMN hidden TYPE boolean USING hidden::boolean;
ALTER TABLE pods ALTER COLUMN secure TYPE boolean USING secure::boolean;
ALTER TABLE pods ALTER COLUMN signup TYPE boolean USING signup::boolean;

dmorley's avatar
dmorley committed
19 20


dmorley's avatar
dmorley committed
21 22 23 24 25 26
DROP TABLE users;

CREATE TABLE apikeys (
 key text,
 email text,
 usage int,
dmorley's avatar
dmorley committed
27
 date_created timestamp DEFAULT current_timestamp
dmorley's avatar
dmorley committed
28 29 30 31 32 33
);

CREATE TABLE clicks (
 domain text,
 manualclick int,
 autoclick int,
dmorley's avatar
dmorley committed
34
 date_clicked timestamp DEFAULT current_timestamp
dmorley's avatar
dmorley committed
35 36 37 38 39 40
);

CREATE TABLE checks (
 domain text,
 online boolean,
 error text,
dmorley's avatar
dmorley committed
41
 date_checked timestamp DEFAULT current_timestamp
dmorley's avatar
dmorley committed
42
);