# Generated by Django 3.2.12 on 2023-05-22 07:20

from django.db import migrations, models
import pgtrigger.compiler
import pgtrigger.migrations


class Migration(migrations.Migration):

    dependencies = [
        ('tests', '0008_alter_parent_key'),
    ]

    operations = [
        migrations.CreateModel(
            name='ChildOfAbstract',
            fields=[
                ('key', models.AutoField(editable=False, primary_key=True, serialize=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        pgtrigger.migrations.AddTrigger(
            model_name='childofabstract',
            trigger=pgtrigger.compiler.Trigger(name='pgpubsub_b1c0b', sql=pgtrigger.compiler.UpsertTriggerSql(declare='DECLARE payload TEXT;', func="\n            \n            payload := json_build_object(\n                'app', 'tests',\n                'model', 'ChildOfAbstract',\n                'old', row_to_json(OLD),\n                'new', row_to_json(NEW)\n              );\n        \n            \n            INSERT INTO pgpubsub_notification (channel, payload)\n            VALUES ('pgpubsub_b1c0b', to_json(payload::text));\n        \n            perform pg_notify('pgpubsub_b1c0b', payload);\n            RETURN NEW;\n        ", hash='392d173cf724ad909495797518008b67dcee4666', operation='UPDATE OR INSERT', pgid='pgtrigger_pgpubsub_b1c0b_c8531', table='tests_childofabstract', when='AFTER')),
        ),
    ]
