comparison doc/upgrading.txt @ 6434:269f39e28d5c

issue2551142 - Import of retired node ... unique constraint failure. Title: Import of retired node with username after active node fails with unique constraint failure. Use different way of checking log output. Remove commit and rollback messages. For some reason python 3.4 in CI has different location for our interesting messages. 3.5+ all passed fine. Update upgrading.txt and CHANGES.txt.
author John Rouillard <rouilj@ieee.org>
date Thu, 10 Jun 2021 16:16:40 -0400
parents 559b3d8e03d7
children 1f2f7c0b8968
comparison
equal deleted inserted replaced
6433:c1d3fbcdbfbd 6434:269f39e28d5c
24 24
25 .. index:: Upgrading; 2.0.0 to 2.1.0 25 .. index:: Upgrading; 2.0.0 to 2.1.0
26 26
27 Migrating from 2.0.0 to 2.x.x 27 Migrating from 2.0.0 to 2.x.x
28 ============================= 28 =============================
29
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 6: foo@example.com
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.
29 103
30 Setuptools is now required to install 104 Setuptools is now required to install
31 ------------------------------------- 105 -------------------------------------
32 106
33 Roundup install now uses setuptools rather than distutils. You must 107 Roundup install now uses setuptools rather than distutils. You must

Roundup Issue Tracker: http://roundup-tracker.org/