# -*- coding: utf-8 -*-
from ppms import ppms
from ppms.constants import *
from ppms.migration import SQLPacket, PacketCategory, MaxVersionDependency


            
class UpdatePythonIDofLicenseDIinDT153(SQLPacket):

    "Changing python_id of DI008262 in DT153 to license"

    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 19063

    def get_dependencies(self):
        return MaxVersionDependency(version='39.5.8')
                
    def fix(self, runner):
        statement ="update dt412 set di041035 ='license' where di000238 = '008262'"
        self.modify_and_log(statement)
            
        return self.success()