summaryrefslogtreecommitdiffstats
path: root/create/postgresql/schema.sql
diff options
context:
space:
mode:
Diffstat (limited to 'create/postgresql/schema.sql')
-rw-r--r--create/postgresql/schema.sql17
1 files changed, 17 insertions, 0 deletions
diff --git a/create/postgresql/schema.sql b/create/postgresql/schema.sql
index 01f696ae..98df0fc1 100644
--- a/create/postgresql/schema.sql
+++ b/create/postgresql/schema.sql
@@ -169,6 +169,23 @@ CREATE TABLE users (
CREATE UNIQUE INDEX users_alias on users (alias);
--
+-- Table structure for table 'audit'
+--
+
+CREATE TABLE audit (
+ auditid serial,
+ userid int4 DEFAULT '0' NOT NULL,
+ clock int4 DEFAULT '0' NOT NULL,
+ action int4 DEFAULT '0' NOT NULL,
+ resource int4 DEFAULT '0' NOT NULL,
+ details varchar(128) DEFAULT '0' NOT NULL,
+ PRIMARY KEY (auditid)
+);
+
+CREATE UNIQUE INDEX audit_userid_clock on audit (userid,clock);
+CREATE INDEX audit_clock on audit (clock);
+
+--
-- Table structure for table 'actions'
--