# Generated by Django 3.2.12 on 2023-05-16 11:51

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


class Migration(migrations.Migration):

    dependencies = [
        ('tests', '0002_auto_20230411_0829'),
    ]

    operations = [
        pgtrigger.migrations.AddTrigger(
            model_name='author',
            trigger=pgtrigger.compiler.Trigger(name='pgpubsub_160cf', sql=pgtrigger.compiler.UpsertTriggerSql(declare='DECLARE payload TEXT;', func="\n            \n            payload := json_build_object(\n                'app', 'tests',\n                'model', 'Author',\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_160cf', to_json(payload::text));\n        \n            perform pg_notify('pgpubsub_160cf', payload);\n            RETURN NEW;\n        ", hash='200718f1bddbea02e3c41f60ccea5676f0ae8860', operation='INSERT', pgid='pgtrigger_pgpubsub_160cf_72a36', table='tests_author', when='AFTER')),
        ),
        pgtrigger.migrations.AddTrigger(
            model_name='media',
            trigger=pgtrigger.compiler.Trigger(name='pgpubsub_a83de', sql=pgtrigger.compiler.UpsertTriggerSql(declare='DECLARE payload TEXT;', func="\n            \n            payload := json_build_object(\n                'app', 'tests',\n                'model', 'Media',\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_a83de', to_json(payload::text));\n        \n            perform pg_notify('pgpubsub_a83de', payload);\n            RETURN NEW;\n        ", hash='658278a249af2641e4e16deb18555b35ab20e597', operation='UPDATE OR INSERT', pgid='pgtrigger_pgpubsub_a83de_cacbb', table='tests_media', when='AFTER')),
        ),
        pgtrigger.migrations.AddTrigger(
            model_name='post',
            trigger=pgtrigger.compiler.Trigger(name='pgpubsub_72091', sql=pgtrigger.compiler.UpsertTriggerSql(declare='DECLARE payload TEXT;', func="\n            \n            payload := json_build_object(\n                'app', 'tests',\n                'model', 'Post',\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_72091', to_json(payload::text));\n        \n            perform pg_notify('pgpubsub_72091', payload);\n            RETURN NEW;\n        ", hash='16a6a1629e6a9fe42f73d460319a92689efdcbfe', operation='DELETE', pgid='pgtrigger_pgpubsub_72091_67aeb', table='tests_post', when='AFTER')),
        ),
    ]
