summaryrefslogtreecommitdiff
path: root/util/sql/schema.sql
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2014-10-13 10:24:01 +0200
committerYorhel <git@yorhel.nl>2014-10-13 10:24:01 +0200
commita1b4da1d3ae9e6ed9326df41f9831be81f6b839a (patch)
treef9a6aff31799cb4eaa5ddc133553b9cdf789bfbe /util/sql/schema.sql
parent26506d2bd7543aea1a4f49634be8b9bf110ad57c (diff)
SQL: Use enum to represent platforms
I believe I didn't do this conversion earlier (back when I converted the language types) because PostgreSQL didn't support dynamically adding new values to an existing enum back then, and modifying an enum was a huge pain. Recent versions do support this, so there's no reason to keep it as a string. ...I just felt like adding some churn to the code base.
Diffstat (limited to 'util/sql/schema.sql')
-rw-r--r--util/sql/schema.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sql/schema.sql b/util/sql/schema.sql
index 0c9f0404..046eccf6 100644
--- a/util/sql/schema.sql
+++ b/util/sql/schema.sql
@@ -170,7 +170,7 @@ CREATE TABLE releases_media (
-- releases_platforms
CREATE TABLE releases_platforms (
rid integer NOT NULL DEFAULT 0,
- platform character(3) NOT NULL DEFAULT 0,
+ platform platform NOT NULL,
PRIMARY KEY(rid, platform)
);
@@ -391,7 +391,7 @@ CREATE TABLE vn (
rgraph integer,
c_released integer NOT NULL DEFAULT 0,
c_languages language[] NOT NULL DEFAULT '{}',
- c_platforms varchar NOT NULL DEFAULT '',
+ c_platforms platform[] NOT NULL DEFAULT '{}',
c_popularity real,
c_rating real,
c_votecount integer NOT NULL DEFAULT 0,