def offline_sync_database_to_version(version=None):
 global USE_TRIGGERS
 USE_TRIGGERS = False
 if version:
  _sync_common_repo(version)
 else:
  expand_schema()
  migrate_data()
  contract_schema()

def offline_sync_database_to_version ( version = None ) : global USE_TRIGGERS USE_TRIGGERS = False if version : _sync_common_repo ( version ) else : expand_schema ( ) migrate_data ( ) contract_schema ( )
perform and off-line sync of the database .