# HG changeset patch # User Aurelien Campeas # Date 1416397003 -3600 # Node ID b23043546f2c405b78935855a0d8660064ae93e2 # Parent 8f7291354095c4afdd90a62a9fd948fcf8d8796d [migration/3.18] speed up the migration and be a little bit more informative Closes #4619277. diff -r 8f7291354095 -r b23043546f2c misc/migration/3.18.0_Any.py --- a/misc/migration/3.18.0_Any.py Mon Nov 24 12:36:17 2014 +0100 +++ b/misc/migration/3.18.0_Any.py Wed Nov 19 12:36:43 2014 +0100 @@ -133,17 +133,19 @@ # recreate the constraints, hook will lead to low-level recreation for eschema in sorted(schema.entities()): if eschema._unique_together: + print 'recreate unique indexes for', eschema rql_args = schemaserial.uniquetogether2rqls(eschema) for rql, args in rql_args: args['x'] = eschema.eid session.execute(rql, args) - commit() - +commit() # all attributes perms have to be refreshed ... -for rschema in schema.relations(): +for rschema in sorted(schema.relations()): if rschema.final: if rschema.type in fsschema: - sync_schema_props_perms(rschema.type, syncprops=False, ask_confirm=False) + print 'sync perms for', rschema.type + sync_schema_props_perms(rschema.type, syncprops=False, ask_confirm=False, commit=False) else: print 'WARNING: attribute %s missing from fs schema' % rschema.type +commit()