Roundup Tracker - Issues

Issue 985142

classification
import error after export?
Type: Severity: normal
Components: Command-line interface Versions:
process
Status: closed
:
: richard : richard
Priority: normal :

Created on 2004-07-05 01:47 by anonymous, last changed 2004-07-19 01:43 by richard.

Messages
msg1345 Author: [hidden] (anonymous) Date: 2004-07-05 01:47
In trying to upgrade versions and move to a new schema,
I've encounted some wierd problems with import.  This
may be due to the way I've handled the upgrade, so some
background first.

Starting version - 0.5.5, Classic
Intermediate version - 0.7.5, Classic
Desired end version - 0.7.5, different schema

The upgrade went relatively smoothly.  From the
intermediate
version I did an export, added the columns for the modified
schema to the CSV files (including sane default values
based on data type), and then eventually got import to
work (although only after encountering the bug below).

Anyway, the following dump shows the bug.  I've deleted
some lines (output from security and list commands etc)
and aberrant spacing is the result of the SF web form
:-))  Note that the 'importing class FOO' messages are
debug code I added trying to track down  the problem
[but probably a nice feature to add for future versions
:-)]

  root@cesspit:/home/tracker/data $ roundup-admin
  Roundup 0.7.5 ready for input.
  Type "help" for help.
  roundup> export /home/tracker/expdata075
  Enter tracker home: /home/tracker/data
  roundup> initialise
  Admin Password: 
         Confirm: 
  WARNING: The database is already initialised!
  If you re-initialise it, you will lose all the data!
  Erase it? Y/N: y
  roundup> import /home/tracker/expdata075
  importing class  status
  setting status 9
  importing class  timelog
  setting timelog 2
  importing class  timelogtype
  setting timelogtype 9
  importing class  severity
  setting severity 6
  importing class  keyword
  setting keyword 4
  importing class  project
  setting project 2
  importing class  organisation
  setting organisation 5
  importing class  orgunit
  setting orgunit 2
  importing class  priority
  setting priority 8
  importing class  msgtype
  setting msgtype 3
  importing class  user
  setting user 59
  importing class  file
  Traceback (most recent call last):
    File
"/usr/local/lib/python2.3/site-packages/roundup/admin.py",
line 1275, in run_command
      ret = function(args[1:])
    File
"/usr/local/lib/python2.3/site-packages/roundup/admin.py",
line 1106, in do_import
      nodeid = int(cl.import_list(file_props, r))
    File
"/usr/local/lib/python2.3/site-packages/roundup/backends/rdbms_common.py",
line 2467, in import_list
      self.db.setnode(self.classname, newid, d) # update
    File  
"/usr/local/lib/python2.3/site-packages/roundup/backends/rdbms_common.py",
line 840, in setnode
    self.cursor.execute(sql, vals)
    File
"/usr/local/lib/python2.3/site-packages/sqlite/main.py",
line 255, in execute
      self.rs = self.con.db.execute(SQL % parms)
    DatabaseError: no such column: _content
  roundup> 
  roundup> exit...

Hmmm... Immediately after, I then run roundup-admin as
follows,
and it works.   

root@cesspit:/home/tracker/data $ python -d `which
roundup-admin`
Roundup 0.7.5 ready for input.
Type "help" for help.
roundup> import 
Enter tracker home: /home/tracker/data
Error: Not enough arguments supplied

Usage: import import_dir
        Import a database from the directory containing
CSV files, two per
        class to import.

        The files used in the import are:

        <class>.csv
          This must define the same properties as the
class (including
          having a "header" line with those property
names.)
        <class>-journals.csv
          This defines the journals for the items being
imported.

        The imported nodes will have the same nodeid as
defined in the
        import file, thus replacing any existing content.

        The new nodes are added to the existing
database - if you want to
        create a new database using the imported data,
then create a new
        database (or, tediously, retire all the old data.)
        
roundup> import /home/tracker/expdata075
importing class  status
setting status 9
importing class  timelog
setting timelog 2
importing class  timelogtype
setting timelogtype 9
importing class  severity
setting severity 6
importing class  keyword
setting keyword 4
importing class  project
setting project 2
importing class  organisation
setting organisation 5
importing class  orgunit
setting orgunit 2
importing class  priority
setting priority 8
importing class  msgtype
setting msgtype 3
importing class  user
setting user 59
importing class  file
setting file 163
importing class  msg
setting msg 2700
importing class  query
setting query 6
importing class  issue
setting issue 1123
importing class  sla
setting sla 6
importing class  workgroup
setting workgroup 2
roundup>
msg1346 Author: [hidden] (richard) Date: 2004-07-19 01:43
Logged In: YES 
user_id=6405

Are you in a position to make  the dump available so I can try to 
reproduce it here? 
 
Email me at richard@users.sourceforge.net if you are able. 
Otherwise, I'll have to close this issue. 
History
Date User Action Args
2004-07-05 01:47:59anonymouscreate