# Generated by Django 4.2.9 on 2024-01-17 01:46
import logging

from django.db import OperationalError, connection, migrations


def create_extension(apps, schema_editor):
    try:
        with connection.cursor() as cursor:
            cursor.execute("CREATE EXTENSION IF NOT EXISTS pg_stat_statements")
    except OperationalError:
        logging.error("Could not install extension `pg_stat_statements`.")


class Migration(migrations.Migration):
    dependencies = []

    operations = [
        migrations.RunPython(create_extension, migrations.RunPython.noop),
    ]
