[Cubicweb] error while migrating an old instance

Alexandre Fayolle alexandre.fayolle at logilab.fr
Sat Sep 11 15:05:08 CEST 2010


Hello,

I have an old instance running at home which uses CW 3.5.5. 

This is what I get when running cwctl upgrade to a recent version
Execute 
'/home/alf/cubicweb/cubicweb/misc/migration/bootstrapmigration_repository.py' 
? [Y/n/s(how)/a(bort)]: 
Execute command: add_entity_type('CWUniqueTogetherConstraint') ? 
[Y/n/a(bort)/s(hell)]: 
Traceback (most recent call last):
  File "/home/alf/cubicweb/cubicweb/cwctl.py", line 150, in run_arg
    status = cmdmeth(appid)
  File "/home/alf/cubicweb/cubicweb/cwctl.py", line 747, in upgrade_instance
    mih.migrate(vcconf, reversed(toupgrade), self.config)
  File "/home/alf/cubicweb/cubicweb/server/migractions.py", line 143, in 
migrate
    super(ServerMigrationHelper, self).migrate(vcconf, toupgrade, options)
  File "/home/alf/cubicweb/cubicweb/migration.py", line 163, in migrate
    self.cmd_process_script(join(migrdir, 'bootstrapmigration_repository.py'))
  File "/home/alf/cubicweb/cubicweb/server/migractions.py", line 148, in 
cmd_process_script
    migrscript, funcname, *args, **kwargs)
  File "/home/alf/cubicweb/cubicweb/migration.py", line 337, in 
cmd_process_script
    execfile(migrscript, scriptlocals)
  File 
"/home/alf/cubicweb/cubicweb/misc/migration/bootstrapmigration_repository.py", 
line 39, in <module>
    add_entity_type('CWUniqueTogetherConstraint')
  File "/home/alf/cubicweb/cubicweb/migration.py", line 134, in <lambda>
    meth=meth)
  File "/home/alf/cubicweb/cubicweb/migration.py", line 200, in interact
    return meth(*args, **kwargs)
  File "/home/alf/cubicweb/cubicweb/server/migractions.py", line 861, in 
cmd_add_entity_type
    self.cmd_add_relation_type(rschema.type, False, commit=True)
  File "/home/alf/cubicweb/cubicweb/server/migractions.py", line 1017, in 
cmd_add_relation_type
    ss.execschemarql(execute, rschema, ss.rschema2rql(rschema, addrdef=False))
  File "/home/alf/cubicweb/cubicweb/server/schemaserial.py", line 369, in 
execschemarql
    rset = execute(rql, kwargs, build_descr=False)
  File "/home/alf/cubicweb/cubicweb/server/session.py", line 693, in execute
    rset = self._execute(self, rql, kwargs, build_descr)
  File "/home/alf/cubicweb/cubicweb/server/querier.py", line 703, in execute
    results = plan.execute()
  File "/home/alf/cubicweb/cubicweb/server/querier.py", line 201, in execute
    result = step.execute()
  File "/home/alf/cubicweb/cubicweb/server/ssplanner.py", line 508, in execute
    result = self.plan.insert_entity_defs()
  File "/home/alf/cubicweb/cubicweb/server/querier.py", line 552, in 
insert_entity_defs
    for edef in row])
  File "/home/alf/cubicweb/cubicweb/server/repository.py", line 1066, in 
glob_add_entity
    source.add_entity(session, entity)
  File "/home/alf/cubicweb/cubicweb/server/sources/native.py", line 571, in 
add_entity
    self.doexec(session, sql, attrs)
  File "/home/alf/cubicweb/cubicweb/server/sources/native.py", line 656, in 
doexec
    cursor.execute(str(query), args)
ProgrammingError: ERREUR:  la colonne « cw_symmetric » de la relation « 
cw_cwrtype » n'existe pas
LINE 1: ..._name, cw_eid, cw_description_format, cw_inlined, cw_symmetr...
                                                             ^

instance biblionadou not upgraded: ERREUR:  la colonne « cw_symmetric » de la 
relation « cw_cwrtype » n'existe pas
LINE 1: ..._name, cw_eid, cw_description_format, cw_inlined, cw_symmetr...
                                                             ^
It looks like some internal schema migrations are not performed in the correct 
order. Any hint on how I should perform the migration so that it works 
correctly ? 

TIA.

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, CubicWeb, Debian :  http://www.logilab.fr/formations
Développement logiciel sur mesure :      http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science



More information about the Cubicweb mailing list