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

from ppms import ppms
from ppms.migration.packet import *

class AddTextConstants(SQLPacket):
    '''Port text constants from Venus to VoE'''
    version = 1
    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 10586

    sql_filename = 'WI10586_add_textconstants.sql'

    def fix(self, runner):
        sqlpath = self.get_sql_file_path(self.sql_planta_de_dbms, self.sql_filename)
        queries = self.get_queries_from_file(sqlpath)

        for query in queries:
            self.modify_and_log(query)

        return self.success()