diff options
author | Magnus Hagander | 2013-08-22 12:44:49 +0000 |
---|---|---|
committer | Magnus Hagander | 2013-08-22 12:45:33 +0000 |
commit | f31c58ddaab82b4ad5fface09f8c384590153ae2 (patch) | |
tree | 6feb89042cda28448d002f469559c010b873a102 /pgweb/docs/struct.py | |
parent | fdd6d91ea0b57d50311a2304a1adc1379a0663aa (diff) |
Fix beta versioning to be more generic test versioning
This allows us to specify both beta and rc versions.
Requires SQL:
ALTER TABLE core_version RENAME COLUMN beta TO testing;
ALTER TABLE core_version ALTER COLUMN testing TYPE integer USING CASE WHEN testing THEN 2 ELSE 0 END;
Diffstat (limited to 'pgweb/docs/struct.py')
-rw-r--r-- | pgweb/docs/struct.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pgweb/docs/struct.py b/pgweb/docs/struct.py index b536ff33..d868b30c 100644 --- a/pgweb/docs/struct.py +++ b/pgweb/docs/struct.py @@ -9,14 +9,14 @@ 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, v.beta FROM docs d INNER JOIN core_version v ON v.tree=d.version ORDER BY d.version DESC") + curs.execute("SELECT d.version, d.file, v.docsloaded, v.testing FROM docs d INNER JOIN core_version v ON v.tree=d.version ORDER BY d.version DESC") # Start priority is higher than average but lower than what we assign # to the current version of the docs. docprio = 0.8 lastversion = None - for version, filename, loaded, beta in curs.fetchall(): + for version, filename, loaded, testing in curs.fetchall(): # Decrease the priority with 0.1 for every version of the docs # we move back in time, until we reach 0.1. At 0.1 it's unlikely # to show up in a general search, but still possible to reach @@ -28,7 +28,7 @@ def get_struct(): yield ('docs/%s/static/%s' % (version==0 and 'devel' or version, filename), - beta and 0.1 or docprio, # beta versions always get 0.1 in prio + testing and 0.1 or docprio, # beta/rc versions always get 0.1 in prio loaded) # Also yield the current version urls, with the highest |