aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-12-10 16:12:55 +0000
committerMatthew Somerville <matthew@mysociety.org>2019-12-10 16:13:11 +0000
commit7c844acae6bbb7f5d64db8d23fb6f01ccb829e5e (patch)
treebe06e9363a3cb4e9e9fafa2466bf61025fd95bda /db
parent6ea3d7f26b8b54ed52e0a90f1e4d7976081c4e3f (diff)
Add missing migration downgrade.
Diffstat (limited to 'db')
-rw-r--r--db/downgrade_0069---0068.sql12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/downgrade_0069---0068.sql b/db/downgrade_0069---0068.sql
new file mode 100644
index 000000000..668258524
--- /dev/null
+++ b/db/downgrade_0069---0068.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'
+ OR object_type = 'moderation'
+);
+
+COMMIT;