-- -*- SQL -*- -- Copyright (C) 2006, Christof Meerwald -- http://downtime.cmeerw.org -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 dated June, 1991. -- -- This program is distributed in the hope that it will be useful, but -- WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -- USA CREATE TABLE state_transition ( id INTEGER PRIMARY KEY, host TEXT NOT NULL, service TEXT, domain TEXT, tstamp INTEGER NOT NULL, state SMALLINT NOT NULL ); CREATE INDEX state_transition_host ON state_transition (host); CREATE INDEX state_transition_tstamp ON state_transition (tstamp); CREATE TABLE statistics ( id INTEGER PRIMARY KEY, host TEXT NOT NULL, service TEXT NOT NULL, domain TEXT NOT NULL, tstamp1 INTEGER NOT NULL, tstamp2 INTEGER, vals BLOB NOT NULL ); CREATE INDEX statistics_host ON statistics (host); CREATE INDEX statistics_tstamp ON statistics (tstamp1);