summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/updates/wip-reviews.sql7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/updates/wip-reviews.sql b/util/updates/wip-reviews.sql
index 6ce5182d..677eb7b6 100644
--- a/util/updates/wip-reviews.sql
+++ b/util/updates/wip-reviews.sql
@@ -1,3 +1,10 @@
+ALTER TABLE reports ADD COLUMN objectnum integer;
+UPDATE reports SET objectnum = regexp_replace(object, '^.+\.([0-9]+)$', '\1')::integer WHERE object LIKE '%.%';
+ALTER TABLE reports ALTER COLUMN object TYPE vndbid USING regexp_replace(object, '\.[0-9]+$','')::vndbid;
+ALTER TABLE reports DROP COLUMN rtype;
+DROP TYPE report_type;
+
+
-- WIP: The modifications in this file are not final and haven't been integrated in sql/ yet.
CREATE SEQUENCE reviews_seq;