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

class AddDefaultValueForUsers(SQLPacket):
    '''Adds default values for the user creation in the module 009A3Q'''
    
    version = 1
    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 13901

    file = 'WI13901_fix_default_values.sql'

    def get_dependencies(self):
        return (MinVersionDependency(version='39.4', version_type=VersionType.CUSTOMIZING),
                MaxVersionDependency(version='39.5.5', version_type=VersionType.CUSTOMIZING))

    def fix(self, runner):
        self.apply_dml_file(self.sql_planta_de_dbms, self.file)
        return self.success()
