]> WPIA git - motion.git/blobdiff - sql/from_6.sql
Merge branch 'admin_cleanup' into 'master'
[motion.git] / sql / from_6.sql
diff --git a/sql/from_6.sql b/sql/from_6.sql
new file mode 100644 (file)
index 0000000..095d54f
--- /dev/null
@@ -0,0 +1,10 @@
+DROP TABLE IF EXISTS adminlog;
+DROP TYPE IF EXISTS "admin_log";
+CREATE TYPE "admin_log" AS ENUM ('motionmasking', 'proxygranted', 'proxyrevoked', 'proxyrevokedall');
+CREATE TABLE adminlog (id serial NOT NULL,
+                   user_id INTEGER NOT NULL,
+                   action admin_log NOT NULL,
+                   comment text NULL,
+                   action_user_id INTEGER NOT NULL,
+                   actiontime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+                   PRIMARY KEY(id));