# -*- coding: utf-8 -*-
import os

from ppms.migration.packet import *

class PortInterfaceBomHandling(SQLPacket):
    '''Port a new warning message in the universal interface'''
    version = 1
    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 11918

    fname = 'wi11918_interface_bom_handling.sql'

    def fix(self, runner):
        sqlpath = self.get_sql_file_path(self.sql_planta_de_dbms, self.fname)
        queries = self.get_queries_from_file(sqlpath)
            
        for query in queries:
            self.modify_and_log(query)

        return self.success()