Exemple #1
0
def updates():
    fixes = Updater("1.3")
    fixes.add(RemoveColumns(Interaction, 'client_version'))
    fixes.add(AddColumns(Reason))
    fixes.add(RebuildTable(Reason, [
               'owner', 'current_owner',
               'group', 'current_group',
               'perms', 'current_perms',
               'status', 'current_status',
               'to', 'current_to']))
    fixes.add(DropTable('reports_ping'))

    return fixes
Exemple #2
0
def updates():
    fixes = Updater("1.1")
    fixes.override_base_version(12) # Do not do this in new code

    fixes.add('alter table reports_interaction add column bad_entries integer not null default -1;')
    fixes.add('alter table reports_interaction add column modified_entries integer not null default -1;')
    fixes.add('alter table reports_interaction add column extra_entries integer not null default -1;')
    fixes.add(_populate_interaction_entry_counts())
    fixes.add(_interactions_constraint_or_idx())
    fixes.add('alter table reports_reason add is_binary bool NOT NULL default False;')
    return fixes
Exemple #3
0
def updates():
    fixes = Updater("1.2")
    fixes.override_base_version(18) # Do not do this in new code
    fixes.add('alter table reports_reason add is_sensitive bool NOT NULL default False;')
    return fixes