aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-21 22:59:49 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-21 22:59:49 +0000
commit262069b2310e7adb87dd9b3ecbc36b7bbb3f32dc (patch)
tree340c547e86ed458b61834a512da680e2a244fc63 /db
parentb2aa34beeabd3a3eb67549a0f303691a5e4736c0 (diff)
Tweak interest_count schema creation.
Diffstat (limited to 'db')
-rw-r--r--db/schema_0022-add_interest_count_to_problems.sql2
-rw-r--r--db/schema_0026-change_interest_count_default.sql9
2 files changed, 1 insertions, 10 deletions
diff --git a/db/schema_0022-add_interest_count_to_problems.sql b/db/schema_0022-add_interest_count_to_problems.sql
index 62092aa0a..4a4703ae1 100644
--- a/db/schema_0022-add_interest_count_to_problems.sql
+++ b/db/schema_0022-add_interest_count_to_problems.sql
@@ -1,6 +1,6 @@
begin;
ALTER table problem
- ADD COLUMN interest_count integer;
+ ADD COLUMN interest_count integer DEFAULT 0;
commit;
diff --git a/db/schema_0026-change_interest_count_default.sql b/db/schema_0026-change_interest_count_default.sql
deleted file mode 100644
index 7c78f6fe8..000000000
--- a/db/schema_0026-change_interest_count_default.sql
+++ /dev/null
@@ -1,9 +0,0 @@
-BEGIN;
-
- ALTER TABLE problem
- ALTER COLUMN interest_count SET DEFAULT 0;
-
- UPDATE problem SET interest_count = 0
- WHERE interest_count IS NULL;
-
-COMMIT;