equal
deleted
inserted
replaced
275 |
275 |
276 def serialize_schema(cursor, schema, verbose=False): |
276 def serialize_schema(cursor, schema, verbose=False): |
277 """synchronize schema and permissions in the database according to |
277 """synchronize schema and permissions in the database according to |
278 current schema |
278 current schema |
279 """ |
279 """ |
280 print 'serializing the schema, this may take some time' |
280 print '-> storing the schema in the system source, this may take some time' |
281 eschemas = schema.entities() |
281 eschemas = schema.entities() |
282 aller = eschemas + schema.relations() |
282 aller = eschemas + schema.relations() |
283 if not verbose: |
283 if not verbose: |
284 pb_size = len(aller) + len(CONSTRAINTS) + len([x for x in eschemas if x.specializes()]) |
284 pb_size = len(aller) + len(CONSTRAINTS) + len([x for x in eschemas if x.specializes()]) |
285 pb = ProgressBar(pb_size) |
285 pb = ProgressBar(pb_size) |