cubicweb #1908680 migration problem from 3.10.8 to 3.13.x [resolved]

$ cubicweb-ctl upgrade eusp
[...]
-> migration needed from 3.10.8 to 3.13.3 for cubicweb
Backup eusp database? [Y/n/a(bort)/s(hell)]: n
-> no backup done.
Execute '/home/nico/cwenv/esp/cubicweb/misc/migration/bootstrapmigration_repository.py' ? [Y/n/s(how)/a(bort)]:
Execute sql: ALTER TABLE entities ADD COLUMN asource VARCHAR(64) ? [Y/n/a(bort)/s(hell)]:
Execute sql: UPDATE entities SET asource=cw_name  FROM cw_CWSource, cw_source_relation WHERE entities.eid=cw_source_relation.eid_from AND cw_source_relation.eid_to=cw_CWSource.cw_eid ? [Y/n/a(bort)/s(hell)]:
Execute '/home/nico/cwenv/esp/cubicweb/misc/migration/3.10.9_Any.py' ? [Y/n/s(how)/a(bort)]:
fix some corrupted entities noticed on several instances? [Y/n/a(bort)/s(hell)]:
Commit now ? [Y/n/a(bort)]:
fix existing cwuri? [Y/n/a(bort)/s(hell)]:
4745 entities to fix [..............................] 4700 committed
Execute command: option_group_changed('anonymous-user', 'main', 'web') ? [Y/n/a(bort)/s(hell)]: Execute command: option_group_changed('anonymous-password', 'main', 'web') ? [Y/n/a(bort)/s(hell)]:
Execute '/home/nico/cwenv/esp/cubicweb/misc/migration/3.11.0_Any.py' ? [Y/n/s(how)/a(bort)]:
Execute command: drop_relation_type('cw_support') ? [Y/n/a(bort)/s(hell)]:
Execute command: drop_relation_type('cw_dont_cross') ? [Y/n/a(bort)/s(hell)]:
Execute command: drop_relation_type('cw_may_cross') ? [Y/n/a(bort)/s(hell)]:
Execute command: add_entity_type('CWSourceSchemaConfig') ? [Y/n/a(bort)/s(hell)]:
Traceback (most recent call last):
 File "/home/nico/cwenv/esp/cubicweb/cwctl.py", line 165, in run_arg
   status = cmdmeth(appid)
 File "/home/nico/cwenv/esp/cubicweb/cwctl.py", line 766, in upgrade_instance
   mih.migrate(vcconf, reversed(toupgrade), self.config)
 File "/home/nico/cwenv/esp/cubicweb/server/migractions.py", line 148, in migrate
   super(ServerMigrationHelper, self).migrate(vcconf, toupgrade, options)
 File "/home/nico/cwenv/esp/cubicweb/migration.py", line 180, in migrate
   self.cmd_process_script(script)
 File "/home/nico/cwenv/esp/cubicweb/server/migractions.py", line 153, in cmd_process_script
   migrscript, funcname, *args, **kwargs)
 File "/home/nico/cwenv/esp/cubicweb/migration.py", line 346, in cmd_process_script
   execfile(migrscript, scriptlocals)
 File "/home/nico/cwenv/esp/cubicweb/misc/migration/3.11.0_Any.py", line 6, in <module>
   add_entity_type('CWSourceSchemaConfig')
 File "/home/nico/cwenv/esp/cubicweb/migration.py", line 136, in <lambda>
   meth=meth)
 File "/home/nico/cwenv/esp/cubicweb/migration.py", line 202, in interact
   return meth(*args, **kwargs)
 File "/home/nico/cwenv/esp/cubicweb/server/migractions.py", line 791, in cmd_add_entity_type
   ss.execschemarql(execute, eschema, ss.eschema2rql(eschema, groupmap))
 File "/home/nico/cwenv/esp/cubicweb/server/schemaserial.py", line 379, in execschemarql
   rset = execute(rql, kwargs, build_descr=False)
 File "/home/nico/cwenv/esp/cubicweb/server/session.py", line 897, in execute
   rset = self._execute(self, rql, kwargs, build_descr)
 File "/home/nico/cwenv/esp/cubicweb/server/querier.py", line 731, in execute
   results = plan.execute()
 File "/home/nico/cwenv/esp/cubicweb/server/querier.py", line 202, in execute
   result = step.execute()
 File "/home/nico/cwenv/esp/cubicweb/server/ssplanner.py", line 507, in execute
   result = self.plan.insert_entity_defs()
 File "/home/nico/cwenv/esp/cubicweb/server/querier.py", line 553, in insert_entity_defs
   for edef in row])
 File "/home/nico/cwenv/esp/cubicweb/server/repository.py", line 1268, in glob_add_entity
   source.add_entity(session, entity)
 File "/home/nico/cwenv/esp/cubicweb/server/sources/native.py", line 637, in add_entity
   self.doexec(session, sql, attrs)
 File "/home/nico/cwenv/esp/cubicweb/server/sources/native.py", line 742, in doexec
   cursor.execute(str(query), args)
IntegrityError: null value in column "cw_modification_date" violates not-null constraint
instance eusp not upgraded: null value in column "cw_modification_date" violates not-null constraint

There is no problem if I migrate from 3.10.8 to 3.12.9, then to 3.13.4.

prioritynormal
typebug
done in3.13.5
load left0.000
closed by#5b3584c5a7c3 [hooks control] test and fix session.reset_hooks_mode_categories, closes #1908680