@@ -27,6 +27,80 @@ Contents:
2727Migrating from 2.0.0 to 2.x.x
2828=============================
2929
30+ Rdbms version change from 5 to 6 (**)
31+ -------------------------------------
32+
33+ To fix an issue with importing databases, the database has to be
34+ upgraded for rdbms backends.
35+
36+ You should run the ``roundup-admin migrate`` command for your
37+ tracker once you've installed the latest codebase.
38+
39+ Do this before you use the web, command-line or mail interface
40+ and before any users access the tracker.
41+
42+ If successful, this command will respond with either "Tracker
43+ updated" (if you've not previously run it on an RDBMS backend) or
44+ "No migration action required" (if you have run it, or have used
45+ another interface to the tracker, or are using anydbm).
46+
47+ This only changes the schema for the mysql backend. It has no
48+ effect other than upgrading the revision on other rdbms backends.
49+
50+ On the mysql backend it creates the database index that makes
51+ sure the key field for your class is unique.
52+
53+ If your update/migration fails, you will see an::
54+
55+ IntegrityError: (1062, "Duplicate entry '0-NULL' for key '_user_key_retired_idx'")
56+
57+ it means you have two non-retired members of the class with the
58+ same key field. E.G. two non-retired users with the same
59+ username.
60+
61+ Debug this using roundup-admin using the list command. For
62+ example dump the user class by the key field ``username``::
63+
64+ $ roundup-admin -i <tracker_home> list user username
65+ 1: admin
66+ 2: anonymous
67+ 3: demo
68+ 4: agent
69+ 5: provisional
70+ 71+ 7: dupe
72+ 8: dupe
73+ ...
74+
75+ then search the usernames for duplicates. Once you have
76+ identified the duplicate username (``dupe`` above), you should
77+ retire the other active duplicates or change the username for the
78+ duplicate. To retire ``7: dupe``, you run::
79+
80+ roundup-admin -i <tracker_home> retire user7
81+
82+ (use ``restore user7`` if you retired the wrong item). If you
83+ want to rename the entry use::
84+
85+ roundup-admin -i <tracker_home> set user7 username=dupe1
86+
87+ Keep doing this until you have no more duplicates. Then run the
88+ update/migrate again.
89+
90+ If you have duplicate non-retired entries in your database,
91+ please email roundup-users at lists.sourceforge.net. We are
92+ interested in how many issues this has caused. Duplicate creation
93+ should occur only when two or more mysql processes run in
94+ parallel and both of them creating an item with the same key. So
95+ this should be a rare event. The internal duplicate prevention
96+ checks should work in other cases.
97+
98+ For the nerds: if you had a new installation that was created at
99+ version 5, the uniqueness of a key was not enforced at the
100+ database level. If you had a database that was at version 4 and
101+ then upgraded to version 5 you have the uniqueness enforcing
102+ constraint.
103+
30104Setuptools is now required to install
31105-------------------------------------
32106
0 commit comments