Example #1
0
File: 1_3_0.py Project: m4z/bcfg2
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
Example #2
0
File: 1_1_x.py Project: m4z/bcfg2
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
Example #3
0
File: 1_2_x.py Project: m4z/bcfg2
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