[Cubicweb] error while migrating an old instance

Alexandre Fayolle alexandre.fayolle at logilab.fr
Mon Sep 13 10:53:25 CEST 2010


On Monday 13 September 2010 10:01:22 Sylvain Thénault wrote:
> On 11 septembre 15:05, Alexandre Fayolle wrote:
> > Hello,
> > 
> > I have an old instance running at home which uses CW 3.5.5.
> 
> ouch.
> 
> > This is what I get when running cwctl upgrade to a recent version
> > Execute
> > '/home/alf/cubicweb/cubicweb/misc/migration/bootstrapmigration_repository
> > .py'
> > 
> >     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...
> > 
> >                                                              ^
> > 
> > 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 ?
> 
> I've checked in a small fix in cw stable that should fix that particular
> pb. Would you give it a try?

This is what I get with the new version: 

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 1051, in 
cmd_add_relation_type
    self.commit()
  File "/home/alf/cubicweb/cubicweb/server/migractions.py", line 291, in 
commit
    self._cnx.commit()
  File "/home/alf/cubicweb/cubicweb/dbapi.py", line 669, in commit
    return self._repo.commit(self.sessionid, **self._txid())
  File "/home/alf/cubicweb/cubicweb/server/repository.py", line 653, in commit
    return session.commit()
  File "/home/alf/cubicweb/cubicweb/server/session.py", line 746, in commit
    operation.handle_event('%s_event' % trstate)
  File "/home/alf/cubicweb/cubicweb/server/hook.py", line 431, in handle_event
    getattr(self, event)()
  File "/home/alf/cubicweb/cubicweb/hooks/integrity.py", line 99, in 
precommit_event
    raise ValidationError(eid, {role_name(rtype, self.role): msg})
ValidationError: 2991 (read_permission-subject): at least one relation can be 
read by is required on Relation type (2991)
instance biblionadou not upgraded: 2991 (read_permission-subject): at least 
one relation can be read by is required on Relation type (2991)



-- 
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