Esempio n. 1
0
def migrate_story_1924():

    log_statement("Start: Removing maxlength constraint from DeletionFormModel")
    for db in db_names:
        if should_not_skip(db):
            migrate_db(db)
    log_statement("End: Removing maxlength constraint from DeletionFormModel")
Esempio n. 2
0
def migrate_bug_2134(all_db_names):
    print "start ...."
    for database in all_db_names:
        if should_not_skip(database):
            print "starting database : %s" % database
            log_statement('\nStart ==============================================================================\n')
            migrate_db(database)
            log_statement('\n End ================================================================================\n')

    print "Completed migration"
Esempio n. 3
0
def migrate_bug_2004(all_db_names):
    print "start ...."
    log_statement(
        '\nStart ===================================================================================================\n')
    for database in all_db_names:
        try:
            if should_not_skip(database):
                migrate_db(database)
        except Exception as e:
            log_statement(":Error" + e.message)
            traceback.print_exc(file=log_file)
    log_statement(
        '\n End ====================================================================================================\n')
    print "Completed migration"
Esempio n. 4
0
def migrate(dbs):
    ''' This migration is for all submission logs that are created when responses for a questionnaire
        are submitted. These do not include subject creation / data sender creation etc submission logs'''

    log_statement('Starting migration process ...... ')
    db_failures = []
    for db in dbs:
        if should_not_skip(db):
            db_failures.append(migrate_db(db, 0))

    if db_failures:
        log_statement('Failed DBs: %s' % db_failures)
        print('Failed DBs: %s' % db_failures)
    log_statement('Completed migration process ...... ')
    print('Completed migrations of submissions to survey responses')
def migrate_all():
    for database in all_db_names(SERVER):
        if should_not_skip(database):
            migrate(database)