aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-27 16:32:34 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-27 16:32:34 +0100
commita4405fe76ab6a86fe1dd1a8ffe02c21abe91a1e4 (patch)
treedee97b413d5ea23a3f08c359cdd1c79061ad2d5b
parent8b4aa43fc9fe027fd4e418cc2cd49924fd3ddfa3 (diff)
allow user changes to be logged
-rw-r--r--db/schema.sql1
-rw-r--r--db/schema_0008-add_user_object_to_admin_log.sql12
2 files changed, 13 insertions, 0 deletions
diff --git a/db/schema.sql b/db/schema.sql
index 22269e98d..bf019c7ec 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -395,6 +395,7 @@ create table admin_log (
object_type text not null check (
object_type = 'problem'
or object_type = 'update'
+ or object_type = 'user'
),
object_id integer not null,
action text not null check (
diff --git a/db/schema_0008-add_user_object_to_admin_log.sql b/db/schema_0008-add_user_object_to_admin_log.sql
new file mode 100644
index 000000000..dd8f03645
--- /dev/null
+++ b/db/schema_0008-add_user_object_to_admin_log.sql
@@ -0,0 +1,12 @@
+begin;
+
+ ALTER TABLE admin_log DROP CONSTRAINT admin_log_object_type_check;
+
+ ALTER TABLE admin_log ADD CONSTRAINT admin_log_object_type_check CHECK (
+ object_type = 'problem'
+ or object_type = 'update'
+ or object_type = 'user'
+ );
+
+
+commit;