from ppms.migration import PacketCategory, MaxVersionDependency, VersionType, MinVersionDependency, \
    SQLPacket


FILE = 'WI14505_port_dialog_message.sql'


class PortDialogmessage(SQLPacket):
    """Ports a dialog message to VenusOnEarth"""
    done_after_success = True
    run_on_startup = True
    category = PacketCategory.CATEGORY_MANDATORY
    wi_number = 14505
    
    def get_dependencies(self):
        return (MinVersionDependency(version='39.4', version_type=VersionType.CUSTOMIZING),
                MaxVersionDependency(version='39.5.0', version_type=VersionType.CUSTOMIZING))
    
    def fix(self, runner):
          
        self.apply_dml_file(self.sql_planta_de_dbms, FILE, split=True)
            
        return self.success()
        