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

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

class AddDialogMessages(SQLPacket):
    '''Port dialog messages from Venus to Venus on Earth

    Adds message IDs 0897, 0911, 0913, 0922, 0927, 0928, 0929
    '''
    version = 1
    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 10594

    sql_filename = 'WI10594_add_dialog_messages.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()