# Generated by Django 3.2 on 2021-11-01 18:48

from django.db import migrations


CREATE_VIEW_SQL = """
    CREATE VIEW urlid_graph_object_repository AS
        SELECT
            o.uuid,
            o.entity_uuid,
            o.internal_id,
            s.search_data
        FROM urlid_graph_object AS o
          LEFT JOIN urlid_graph_object_fts AS s
            ON s.object_uuid = o.uuid;
"""

DROP_VIEW_SQL = """
    DROP VIEW IF EXISTS urlid_graph_object_repository;
"""


class Migration(migrations.Migration):

    dependencies = [
        ('urlid_graph', '0003_auto_20211101_1844'),
    ]

    operations = [migrations.RunSQL(sql=CREATE_VIEW_SQL, reverse_sql=DROP_VIEW_SQL)]
