From: richard Date: Fri, 17 Oct 2003 01:53:11 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=22e46f632cc1a2b438b126a6c9f5cea7774af84e;p=roundup.git *** empty log message *** git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1917 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 1c187f3..a742947 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,6 +14,7 @@ Fixed: Fixed: - Fixed detectors fix incorrectly fixed in bugfix release 0.6.2 - Added note to upgrading doc for detectors fix in 0.6.2 +- added script to help migrating queries from pre-0.6 trackers 2003-09-29 0.6.2 diff --git a/doc/customizing.txt b/doc/customizing.txt index 25b6628..67de904 100644 --- a/doc/customizing.txt +++ b/doc/customizing.txt @@ -2,7 +2,7 @@ Customising Roundup =================== -:Version: $Revision: 1.103 $ +:Version: $Revision: 1.104 $ .. This document borrows from the ZopeBook section on ZPT. The original is at: http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx @@ -16,7 +16,7 @@ What You Can Do Before you get too far, it's probably worth having a quick read of the Roundup `design documentation`_. -Customisation of Roundup can take one of five forms: +Customisation of Roundup can take one of six forms: 1. `tracker configuration`_ file changes 2. database, or `tracker schema`_ changes diff --git a/doc/gadfly.txt b/doc/gadfly.txt deleted file mode 100644 index df77b69..0000000 --- a/doc/gadfly.txt +++ /dev/null @@ -1,51 +0,0 @@ -============== -Gadfly Backend -============== - -This document outlines the design and implementation of the Gadfly (relational -database) backend. - - -About Gadfly -============ - -Gadfly is a collection of python modules that provides relational -database functionality entirely implemented in Python. It supports a -subset of the intergalactic standard RDBMS Structured Query Language -SQL. - - -Basic Structure -=============== - -Roundup supports a dynamic schema, something which doesn't map very well to a -relational database table schema (or at least, it's frowned upon :) - -Approaches: - -1. Map roundup classes to relational tables. Automatically detect schema - changes and modify the gadfly table schemas appropriately. Multilinks - (which represent a many-to-many relationship) are handled through - intermediate tables. - Journals are stored adjunct to the per-class tables. -2. Map roundup classes to relational tables. Automatically detect schema - changes and modify the gadfly table schemas appropriately. Multilinks - are handled with string representations of the id lists. - Journals are stored adjunct to the per-class tables. -3. Four tables: - - - classes: class id, name - - properties: class id, property id, name, type, options - - nodes: class id, node id, property id, value (one row per multilink value) - - journals: class id, node id, event, description - - The classes and properties tables will need to be kept in sync with the - roundup schema. -4. Two less efficient tables: - - - nodes: class, property, node id, value (one row per multilink value) - - journals: class, node id, event, description - - The classes and properties tables will need to be kept in sync with the - roundup schema. - diff --git a/doc/installation.txt b/doc/installation.txt index e704d7c..37dee4b 100644 --- a/doc/installation.txt +++ b/doc/installation.txt @@ -2,7 +2,7 @@ Installing Roundup ================== -:Version: $Revision: 1.60 $ +:Version: $Revision: 1.61 $ .. contents:: @@ -31,12 +31,10 @@ Roundup scripts Prerequisites ============= -Python 2.1.1 or newer with a functioning anydbm or bsddb module. Download the +Python 2.1.3 or newer with a functioning anydbm or bsddb module. Download the latest version from http://www.python.org/. It is highly recommended that -users install the latest patch version of python - 2.1.3 or 2.2.3 - as these -contain many fixes to serious bugs. Python 2.3 (currently in beta) has some -"issues", at least with the SQLite backend, and possibly with other backends -as well. It shouldn't be used with Roundup for now. +users install the latest patch version of python - 2.1.3, 2.2.3 or 2.3.2 - +as these contain many fixes to serious bugs. If you want to use Berkeley DB bsddb3 with Roundup, use version 3.3.0 or later. Download the latest version from http://pybsddb.sourceforge.net/. @@ -56,8 +54,8 @@ Testing your Python ------------------- Once you've unpacked roundup's source, run ``python ./run_tests`` in the -source directory and make sure there are no errors. -If there are errors, please let us know! +source directory and make sure there are no errors. If there are errors, +please let us know! If the above fails, you may be using the wrong version of python. Try ``python2 ./run_tests``. If that works, you will need to substitute @@ -82,10 +80,10 @@ at so you may start playing. Three users will be set up: Installation ============ -Note: some systems, such as Debian and NetBSD, already have Roundup - installed. Try running the command "roundup-admin" with no arguments, - and if it runs you may skip the `Basic Installation Steps`_ - below. +:Note: Some systems, such as Debian and NetBSD, already have Roundup + installed. Try running the command "roundup-admin" with no arguments, + and if it runs you may skip the `Basic Installation Steps`_ + below and go straight to `configuring your first tracker`_. Set aside 15-30 minutes. Please make sure you're using a supported version of Python -- see `testing your python`_. There's several steps to follow in your @@ -244,9 +242,8 @@ There's several to choose from, each with benefits and limitations: **mysql** Backend for popular RDBMS MySQL. According to benchmarks, this backend works much faster than any of \*dbm ones, but slightly slower than metakit and - sqlite. Scalability is unknown at present. Roundup requires InnoDB or BDB - support in MySQL. For more info on requirements and installation see - `additional mysql documentation`_ (doc/mysql.txt) + sqlite. A good scalability is not a property of this backend for now, + though. For more info on backend installation see doc/mysql.txt. **metakit** This backend is implemented over the metakit_ storage system, using Mk4Py as the interface. It scales much better than the dbm backends. @@ -327,23 +324,6 @@ name=home values on the command-line after all the other options. To make the server run in the background, use the "-d" option, specifying the name of a file to write the server process id (pid) to. -To run the server proxied through apache (to take advantage of SSL or other -apache features), use the following configuration lines:: - - LoadModule proxy_module libexec/apache2/mod_proxy.so - LoadModule proxy_connect_module libexec/apache2/mod_proxy_connect.so - LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so - - - ProxyPass http://192.168.1.2:9090/roundup/ - AuthType Basic - AuthName Roundup - AuthUserFile /some/place/htpasswd - Require valid-user - - -Changing the ProxyPass line to point to the server you're running. - Zope Product - ZRoundup ~~~~~~~~~~~~~~~~~~~~~~~ @@ -585,5 +565,4 @@ Next: `User Guide`_ .. _`maintenance documentation`: maintenance.html .. _sqlite: http://www.hwaci.com/sw/sqlite/ .. _metakit: http://www.equi4.com/metakit/ -.. _`additional mysql documentation`: doc/mysql.html diff --git a/doc/upgrading.txt b/doc/upgrading.txt index 1547d50..eaf125f 100644 --- a/doc/upgrading.txt +++ b/doc/upgrading.txt @@ -154,7 +154,10 @@ search page using the macros detailed in the customisation doc section __ customizing.html#searching-on-categories Also, the url field in the query class no longer starts with a '?'. You'll need -to remove this question mark from the url field to support queries. +to remove this question mark from the url field to support queries. There's +a script in the "tools" directory called ``migrate-queries.py`` that should +automatically change any existing queries for you. As always, make a backup +of your database before running such a script. 0.6.0 Notes for metakit backend users diff --git a/tools/migrate-queries.py b/tools/migrate-queries.py new file mode 100644 index 0000000..536a934 --- /dev/null +++ b/tools/migrate-queries.py @@ -0,0 +1,42 @@ +#! /usr/bin/env python +''' +migrate-queries [ *] + +Migrate old queries in the specified instances to Roundup 0.6.0+ by +removing the leading ? from their URLs. 0.6.0+ queries do not carry a +leading ?; it is added by the 0.6.0 templating, so old queries lead +to query URLs with a double leading ?? and a consequent 404 Not Found. +''' +__author__ = 'James Kew ' + +import sys +import roundup.instance + +if len(sys.argv) == 1: + print __doc__ + sys.exit(1) + +# Iterate over all instance homes specified in argv. +for home in sys.argv[1:]: + # Do some basic exception handling to catch bad arguments. + try: + instance = roundup.instance.open(home) + except: + print 'Cannot open instance home directory %s!' % home + continue + + db = instance.open('admin') + + print 'Migrating active queries in %s (%s):'%( + instance.config.TRACKER_NAME, home) + for query in db.query.list(): + url = db.query.get(query, 'url') + if url[0] == '?': + url = url[1:] + print ' Migrating query%s (%s)'%(query, + db.query.get(query, 'name')) + db.query.set(query, url=url) + + db.commit() + db.close() +