summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/jsgen.pl2
-rw-r--r--util/updates/update_2.16.sql6
2 files changed, 7 insertions, 1 deletions
diff --git a/util/jsgen.pl b/util/jsgen.pl
index 4af20b27..c1a9593b 100755
--- a/util/jsgen.pl
+++ b/util/jsgen.pl
@@ -104,7 +104,7 @@ sub jsgen {
$common .= sprintf "rlst_rstat = [ %s ];\n", join ', ', map qq{"$_"}, @{$S{rlst_rstat}};
$common .= sprintf "rlst_vstat = [ %s ];\n", join ', ', map qq{"$_"}, @{$S{rlst_vstat}};
$common .= sprintf "cookie_prefix = '%s';\n", $S{cookie_prefix};
- $common .= sprintf "age_ratings = [ %s ];\n", join ',', map !defined $_ ? -1 : $_, @{$S{age_ratings}};
+ $common .= sprintf "age_ratings = [ %s ];\n", join ',', map @{$S{age_ratings}};
$common .= sprintf "languages = [ %s ];\n", join ', ', map qq{"$_"}, @{$S{languages}};
$common .= sprintf "platforms = [ %s ];\n", join ', ', map qq{"$_"}, @{$S{platforms}};
$common .= sprintf "media = [ %s ];\n", join ', ', map qq{"$_"}, sort keys %{$S{media}};
diff --git a/util/updates/update_2.16.sql b/util/updates/update_2.16.sql
new file mode 100644
index 00000000..8ffbd6ae
--- /dev/null
+++ b/util/updates/update_2.16.sql
@@ -0,0 +1,6 @@
+
+-- remove the NOT NULL from rr.minage and use -1 when unknown
+UPDATE releases_rev SET minage = -1 WHERE minage IS NULL;
+ALTER TABLE releases_rev ALTER COLUMN minage SET DEFAULT -1;
+ALTER TABLE releases_rev ALTER COLUMN minage DROP NOT NULL;
+