migrating roundup 1.3.3 to 1.4.20

Chad Seys <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi John and all,
   Thanks to your advice I tried roundup-admin again and it worked for 2 
trackers and failed for a third.
   This helped:
"
Are you sure that /roundup/test has the same schema.py and other files
that the original rounup instance had?
"
  Because I was only moving over database and db/msg files and using the 
schema.py from the new roundup version.  With the two trackers which succeeded 
I left schema.py alone until after "roundup-admin migrate" succeeded.
  Thanks!


  Now I'm having different troubles.
  First problem encountered while creating the unique index as directed by the 
Upgrading from 1.3.3 to 1.4 .  I think I overcome that problem, but let me 
know if I did something wrong... :

mysql> CREATE INDEX words_by_id ON __words (_textid);
Query OK, 891233 rows affected (1 min 30.31 sec)
Records: 891233  Duplicates: 0  Warnings: 0

mysql> CREATE UNIQUE INDEX __textids_by_props ON __textids (_class, _itemid, 
_prop);
ERROR 1062 (23000): Duplicate entry 'issue-130-title' for key 
'__textids_by_props'

mysql> set session old_alter_table=1;
Query OK, 0 rows affected (0.00 sec)

mysql> ALTER IGNORE TABLE __textids ADD UNIQUE INDEX (_class, _itemid, _prop);
Query OK, 25815 rows affected (0.54 sec)
Records: 25815  Duplicates: 7351  Warnings: 0

mysql> CREATE UNIQUE INDEX __textids_by_props ON __textids (_class, _itemid, 
_prop);
Query OK, 18464 rows affected (0.66 sec)
Records: 18464  Duplicates: 0  Warnings: 0

mysql> drop index _class on __textids;
Query OK, 18464 rows affected (0.52 sec)
Records: 18464  Duplicates: 0  Warnings: 0


Next I tried to "roundup-admin migrate".
Unfortunately I get a complaint about Duplicate key:
Traceback (most recent call last):
  File "/usr/bin/roundup-admin", line 3, in <module>
    run()
  File "/usr/lib/python2.7/dist-packages/roundup/scripts/roundup_admin.py", 
line 36, in run
    sys.exit(tool.main())
  File "/usr/lib/python2.7/dist-packages/roundup/admin.py", line 1577, in main
    ret = self.run_command(args)
  File "/usr/lib/python2.7/dist-packages/roundup/admin.py", line 1476, in 
run_command
    self.db = tracker.open('admin')
  File "/usr/lib/python2.7/dist-packages/roundup/instance.py", line 152, in 
open
    db.post_init()
  File "/usr/lib/python2.7/dist-packages/roundup/backends/rdbms_common.py", 
line 298, in post_init
    save = save | self.upgrade_db()
  File "/usr/lib/python2.7/dist-packages/roundup/backends/rdbms_common.py", 
line 349, in upgrade_db
    self.fix_version_4_tables()
  File "/usr/lib/python2.7/dist-packages/roundup/backends/rdbms_common.py", 
line 376, in fix_version_4_tables
    self.add_class_key_required_unique_constraint(cn, klass.key)
  File "/usr/lib/python2.7/dist-packages/roundup/backends/back_mysql.py", line 
433, in add_class_key_required_unique_constraint
    self.sql(sql)
  File "/usr/lib/python2.7/dist-packages/roundup/backends/rdbms_common.py", 
line 221, in sql
    cursor.execute(sql)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in 
execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in 
defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1061, "Duplicate key name 
'_status_key_retired_idx'")

mysql> show indexes in _status;                                                                                                                               
+---------+------------+-------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---
------------+
| Table   | Non_unique | Key_name                | Seq_in_index | Column_name 
| Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | 
In
dex_comment |
+---------+------------+-------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---
------------+
| _status |          0 | PRIMARY                 |            1 | id          
| A         |           2 |     NULL | NULL   |      | BTREE      |         |   
            |
| _status |          0 | _status_key_retired_idx |            1 | __retired__ 
| A         |           8 |     NULL | NULL   | YES  | BTREE      |         |   
            |
| _status |          0 | _status_key_retired_idx |            2 | _name       
| A         |           8 |      255 | NULL   | YES  | BTREE      |         |   
            |
| _status |          1 | _status_retired_idx     |            1 | __retired__ 
| A         |           2 |     NULL | NULL   | YES  | BTREE      |         |   
            |
| _status |          1 | _status_name_idx        |            1 | _name       
| A         |           2 |      255 | NULL   | YES  | BTREE      |         |   
            |
+---------+------------+-------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---
------------+

Not sure how to fix this!

Thanks!
Chad.

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.