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


class NewTextConstantsForClientCSVModule(SQLPacket):
    """Port 2 new text constants for the ClientCSVModule"""
    version = 1
    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 12300

    file = 'wi12300_client_transfer.sql'

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

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

        return self.success()
