diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-01 09:00:00 -0500 |
---|---|---|
committer | Tim Laszlo <tim.laszlo@gmail.com> | 2012-06-01 09:04:42 -0500 |
commit | b9c8a6c4c0245db0515a164f1b89247688e3b4fa (patch) | |
tree | 4565843b30bef6ede7a58cff2ebf209f37eabfdd /src/lib/Bcfg2/Server/Reports/Updater/Changes/1_3_0.py | |
parent | eae8bbd6d211d711be4f414f108aa597b38891e0 (diff) | |
download | bcfg2-b9c8a6c4c0245db0515a164f1b89247688e3b4fa.tar.gz bcfg2-b9c8a6c4c0245db0515a164f1b89247688e3b4fa.tar.bz2 bcfg2-b9c8a6c4c0245db0515a164f1b89247688e3b4fa.zip |
DBStats: New db update routines
Replace updatefix.py with the Updater class. This streamlines some
of the common tasks and groups database updates by release. Upgrades
from pre 1.1.x are no longer supported.
Diffstat (limited to 'src/lib/Bcfg2/Server/Reports/Updater/Changes/1_3_0.py')
-rw-r--r-- | src/lib/Bcfg2/Server/Reports/Updater/Changes/1_3_0.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Reports/Updater/Changes/1_3_0.py b/src/lib/Bcfg2/Server/Reports/Updater/Changes/1_3_0.py new file mode 100644 index 000000000..b09b06302 --- /dev/null +++ b/src/lib/Bcfg2/Server/Reports/Updater/Changes/1_3_0.py @@ -0,0 +1,26 @@ +""" +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.Reports.Updater import Updater, UpdaterError +from Bcfg2.Server.Reports.Updater.Routines import AddColumns, \ + RemoveColumns, RebuildTable + +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'])) + + return fixes + |