def METHOD_NAME(apps, schema_editor):
    Endpoint = apps.get_model("terminal", "Endpoint")
    # migrate default
    default_data = {
        'id': '00000000-0000-0000-0000-000000000001',
        'name': 'Default',
        'host': '',
        'https_port': 0,
        'http_port': 0,
        'created_by': 'System'
    }
    Endpoint.objects.create(**default_data)
    if not settings.TERMINAL_RAZOR_ENABLED:
        return
    # migrate xrdp
    xrdp_addr = settings.TERMINAL_RDP_ADDR
    if ':' in xrdp_addr:
        host, rdp_port = xrdp_addr.strip().split(':')
    else:
        host, rdp_port = xrdp_addr, 3389
    host = host.strip()
    if host in ['localhost', '127.0.0.1']:
        host = ''
    if not host:
        return
    if isinstance(rdp_port, str) and rdp_port.isdigit():
        rdp_port = int(rdp_port)
    elif isinstance(rdp_port, int) and (0 <= rdp_port <= 65535):
        rdp_port = rdp_port
    else:
        rdp_port = 3389
    xrdp_data = {
        'name': 'Razor',
        'host': host,
        'https_port': 0,
        'http_port': 0,
        'ssh_port': 0,
        'rdp_port': rdp_port,
        'mysql_port': 0,
        'mariadb_port': 0,
        'postgresql_port': 0,
        'created_by': 'System'
    }
    xrdp_endpoint = Endpoint.objects.create(**xrdp_data)
    EndpointRule = apps.get_model("terminal", "EndpointRule")
    xrdp_rule_data = {
        'name': 'Razor',
        'ip_group': ['*'],
        'priority': 20,
        'endpoint': xrdp_endpoint,
        'created_by': 'System'
    }
    EndpointRule.objects.create(**xrdp_rule_data)