From 5b3ffd488a8b5f727a531a3b7c3ca419bb53d04e Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Tue, 7 Aug 2012 13:37:33 -0500 Subject: Merge reporting configuration with main server configuration Admin/Syncdb: Use SchemaUpdater Move the schema update routines from reports to Bcfg2.Server Move Reports.settings into Bcfg2.settings --- .../Bcfg2/Server/SchemaUpdater/Changes/1_3_0.py | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/lib/Bcfg2/Server/SchemaUpdater/Changes/1_3_0.py (limited to 'src/lib/Bcfg2/Server/SchemaUpdater/Changes/1_3_0.py') diff --git a/src/lib/Bcfg2/Server/SchemaUpdater/Changes/1_3_0.py b/src/lib/Bcfg2/Server/SchemaUpdater/Changes/1_3_0.py new file mode 100644 index 000000000..4fc57c653 --- /dev/null +++ b/src/lib/Bcfg2/Server/SchemaUpdater/Changes/1_3_0.py @@ -0,0 +1,27 @@ +""" +1_3_0.py + +This file should contain updates relevant to the 1.3.x branches ONLY. +The updates() method must be defined and it should return an Updater object +""" +from Bcfg2.Server.SchemaUpdater import Updater, UpdaterError +from Bcfg2.Server.SchemaUpdater.Routines import AddColumns, \ + RemoveColumns, RebuildTable, DropTable + +from Bcfg2.Server.Reports.reports.models import Reason, Interaction + + +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 + -- cgit v1.2.3-1-g7c22