summaryrefslogtreecommitdiff
path: root/util/updates
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-01-10 10:23:00 +0100
committerYorhel <git@yorhel.nl>2009-01-10 10:23:00 +0100
commit9663376cd572b6f94c83f9a580c25fbd2bdc67f2 (patch)
treece979133cee531de8a07520f479f609307943502 /util/updates
parente954078d3e8d26724e07d3275dc789083421bd86 (diff)
Convert all existing patch media in the DB to the new patch flag
Diffstat (limited to 'util/updates')
-rw-r--r--util/updates/update_2.2.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/updates/update_2.2.sql b/util/updates/update_2.2.sql
index 50ca7471..d65f8bef 100644
--- a/util/updates/update_2.2.sql
+++ b/util/updates/update_2.2.sql
@@ -2,6 +2,11 @@
-- custom CSS
ALTER TABLE users ADD COLUMN customcss text NOT NULL DEFAULT '';
+
+
-- patch flag
ALTER TABLE releases_rev ADD COLUMN patch BOOLEAN NOT NULL DEFAULT FALSE;
+UPDATE releases_rev SET patch = TRUE
+ WHERE EXISTS(SELECT 1 FROM releases_media rm WHERE rm.rid = id AND rm.medium = 'pa ');
+DELETE FROM releases_media WHERE medium = 'pa ';