posthog/management/commands/setup_test_environment.py
from django.core.management.base import BaseCommand
from django.test.runner import DiscoverRunner as TestRunner
from infi.clickhouse_orm import Database
from posthog.clickhouse.schema import (
    CREATE_DISTRIBUTED_TABLE_QUERIES,
    CREATE_KAFKA_TABLE_QUERIES,
    CREATE_MERGETREE_TABLE_QUERIES,
    CREATE_MV_TABLE_QUERIES,
    build_query,
)
from posthog.settings import (
    CLICKHOUSE_CLUSTER,
    CLICKHOUSE_DATABASE,
    CLICKHOUSE_HTTP_URL,
    CLICKHOUSE_PASSWORD,
    CLICKHOUSE_USER,
    CLICKHOUSE_VERIFY,
    TEST,
)
class Command(BaseCommand):