From 8be717d99d3a2e29ff9fe4801bee5efd633c4600 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Sat, 17 Aug 2013 15:35:42 +0200 Subject: Use a proper database field for beta releases This replaces the previous ugly hack where beta versions had a negative number as latestminor, giving a much cleaner model. Requires SQL: ALTER TABLE core_version ADD COLUMN beta boolean NOT NULL DEFAULT 'f'; ALTER TABLE core_version ALTER COLUMN beta DROP DEFAULT; (Yes, we really need to move to something that can do automatic migrations) --- pgweb/docs/struct.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pgweb/docs/struct.py') diff --git a/pgweb/docs/struct.py b/pgweb/docs/struct.py index 28271f05..ea64d443 100644 --- a/pgweb/docs/struct.py +++ b/pgweb/docs/struct.py @@ -9,7 +9,7 @@ def get_struct(): # Can't use a model here, because we don't (for some reason) have a # hard link to the versions table here curs = connection.cursor() - curs.execute("SELECT d.version, d.file, v.docsloaded FROM docs d INNER JOIN core_version v ON v.tree=d.version WHERE d.version > 0 AND v.latestminor >= 0 ORDER BY d.version DESC") + curs.execute("SELECT d.version, d.file, v.docsloaded FROM docs d INNER JOIN core_version v ON v.tree=d.version WHERE d.version > 0 AND NOT beta ORDER BY d.version DESC") # Start priority is higher than average but lower than what we assign # to the current version of the docs. -- cgit v1.2.3