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


class PortInterfaceArchiveParameterCustomizing(SQLPacket):
    """Port Dataarea assignments for the PLANTA Link archive module"""
    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 14517

    FILENAME = 'wi14517_interface_archive_parameters.sql'

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

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

        return self.success()