2 * Copyright (C) 2004-2008 Georgia Public Library Service
3 * Copyright (C) 2008 Equinox Software, Inc.
4 * Mike Rylander <miker@esilibrary.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
19 DROP SCHEMA offline CASCADE;
23 CREATE SCHEMA offline;
25 CREATE TABLE offline.script (
26 id SERIAL PRIMARY KEY,
27 session TEXT NOT NULL,
28 requestor INTEGER NOT NULL,
29 create_time INTEGER NOT NULL,
30 workstation TEXT NOT NULL,
31 logfile TEXT NOT NULL,
32 time_delta INTEGER NOT NULL DEFAULT 0,
33 count INTEGER NOT NULL DEFAULT 0
35 CREATE INDEX offline_script_pkey ON offline.script (id);
36 CREATE INDEX offline_script_ws ON offline.script (workstation);
37 CREATE INDEX offline_script_session ON offline.script (session);
40 CREATE TABLE offline.session (
44 creator INTEGER NOT NULL,
45 create_time INTEGER NOT NULL,
46 in_process INTEGER NOT NULL DEFAULT 0,
49 num_complete INTEGER NOT NULL DEFAULT 0
51 CREATE INDEX offline_session_pkey ON offline.session (key);
52 CREATE INDEX offline_session_org ON offline.session (org);
53 CREATE INDEX offline_session_creation ON offline.session (create_time);