# Generated by Django 2.2.10 on 2020-02-18 12:51
import django.contrib.postgres.indexes
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):

    dependencies = [("reporting", "0098_auto_20200221_2034")]

    operations = [
        migrations.RunSQL(
            """
drop materialized view if exists reporting_ocpallcostlineitem_daily_summary;
drop materialized view if exists reporting_ocpallcostlineitem_project_daily_summary;
            """
        ),
        migrations.RemoveIndex(model_name="ocpawscostlineitemdailysummary", name="cost_summary_node_idx"),
        migrations.RemoveIndex(
            model_name="ocpawscostlineitemprojectdailysummary", name="cost__proj_sum_namespace_idx"
        ),
        migrations.RemoveIndex(model_name="ocpawscostlineitemprojectdailysummary", name="cost_proj_sum_node_idx"),
        migrations.RemoveIndex(model_name="ocpazurecostlineitemdailysummary", name="ocpazure_node_idx"),
        migrations.RemoveIndex(
            model_name="ocpazurecostlineitemprojectdailysummary", name="ocpazure_proj_namespace_idx"
        ),
        migrations.RemoveIndex(model_name="ocpazurecostlineitemprojectdailysummary", name="ocpazure_proj_node_idx"),
        migrations.RemoveIndex(model_name="ocpusagelineitemdaily", name="namespace_idx"),
        migrations.RemoveIndex(model_name="ocpusagelineitemdaily", name="node_idx"),
        migrations.RemoveIndex(model_name="ocpusagelineitemdailysummary", name="summary_namespace_idx"),
        migrations.RemoveIndex(model_name="ocpusagelineitemdailysummary", name="summary_node_idx"),
        migrations.AlterField(
            model_name="ocpawscostlineitemprojectdailysummary", name="usage_end", field=models.DateField()
        ),
        migrations.AlterField(
            model_name="ocpawscostlineitemprojectdailysummary", name="usage_start", field=models.DateField()
        ),
        migrations.AlterField(
            model_name="ocpazurecostlineitemdailysummary", name="usage_end", field=models.DateField()
        ),
        migrations.AlterField(
            model_name="ocpazurecostlineitemdailysummary", name="usage_start", field=models.DateField()
        ),
        migrations.AlterField(
            model_name="ocpazurecostlineitemprojectdailysummary", name="usage_end", field=models.DateField()
        ),
        migrations.AlterField(
            model_name="ocpazurecostlineitemprojectdailysummary", name="usage_start", field=models.DateField()
        ),
        migrations.AlterField(model_name="ocpstoragelineitemdaily", name="usage_end", field=models.DateField()),
        migrations.AlterField(model_name="ocpstoragelineitemdaily", name="usage_start", field=models.DateField()),
        migrations.AlterField(model_name="ocpusagelineitemdaily", name="total_seconds", field=models.IntegerField()),
        migrations.AlterField(model_name="ocpusagelineitemdaily", name="usage_end", field=models.DateField()),
        migrations.AlterField(model_name="ocpusagelineitemdaily", name="usage_start", field=models.DateField()),
        migrations.AlterField(model_name="ocpusagelineitemdailysummary", name="usage_end", field=models.DateField()),
        migrations.AlterField(model_name="ocpusagelineitemdailysummary", name="usage_start", field=models.DateField()),
        migrations.AddIndex(
            model_name="ocpawscostlineitemdailysummary",
            index=models.Index(fields=["node"], name="cost_summary_node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpawscostlineitemprojectdailysummary",
            index=models.Index(
                fields=["namespace"], name="cost__proj_sum_namespace_idx", opclasses=["varchar_pattern_ops"]
            ),
        ),
        migrations.AddIndex(
            model_name="ocpawscostlineitemprojectdailysummary",
            index=models.Index(fields=["node"], name="cost_proj_sum_node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpazurecostlineitemdailysummary",
            index=models.Index(fields=["node"], name="ocpazure_node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpazurecostlineitemprojectdailysummary",
            index=models.Index(
                fields=["namespace"], name="ocpazure_proj_namespace_idx", opclasses=["varchar_pattern_ops"]
            ),
        ),
        migrations.AddIndex(
            model_name="ocpazurecostlineitemprojectdailysummary",
            index=models.Index(fields=["node"], name="ocpazure_proj_node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpstoragelineitemdaily",
            index=models.Index(
                fields=["namespace"], name="ocp_storage_li_namespace_idx", opclasses=["varchar_pattern_ops"]
            ),
        ),
        migrations.AddIndex(
            model_name="ocpstoragelineitemdaily",
            index=models.Index(fields=["node"], name="ocp_storage_li_node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpusagelineitemdaily",
            index=models.Index(fields=["namespace"], name="namespace_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpusagelineitemdaily",
            index=models.Index(fields=["node"], name="node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpusagelineitemdailysummary",
            index=models.Index(fields=["namespace"], name="summary_namespace_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="ocpusagelineitemdailysummary",
            index=models.Index(fields=["node"], name="summary_node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AlterField(model_name="costsummary", name="usage_end", field=models.DateField()),
        migrations.AlterField(model_name="costsummary", name="usage_start", field=models.DateField()),
        migrations.AddIndex(
            model_name="costsummary", index=models.Index(fields=["usage_start"], name="ocpcostsum_usage_start_idx")
        ),
        migrations.AddIndex(
            model_name="costsummary",
            index=models.Index(
                fields=["namespace"], name="ocpcostsum_namespace_idx", opclasses=["varchar_pattern_ops"]
            ),
        ),
        migrations.AddIndex(
            model_name="costsummary",
            index=models.Index(fields=["node"], name="ocpcostsum_node_idx", opclasses=["varchar_pattern_ops"]),
        ),
        migrations.AddIndex(
            model_name="costsummary",
            index=django.contrib.postgres.indexes.GinIndex(fields=["pod_labels"], name="ocpcostsum_pod_labels_idx"),
        ),
        # This extension will help specifically with "col LIKE %val%"
        # operations. (As long as val is at least 3 characters)
        migrations.RunSQL(
            """
create extension if not exists pg_trgm schema public;
            """
        ),
        # Create indexes to aid with text searching.
        # These cases will specifically help with case-insensitive
        # and contains (vs startswith) searches
        # ocp usage line item daily
        migrations.RunSQL(
            """
/* add namespace index for like trigram ops */
create index if not exists ocp_namespace_idx
    on  reporting_ocpusagelineitem_daily using gin (UPPER(namespace) gin_trgm_ops);

/* add node index for like trigram ops */
create index if not exists ocp_node_idx
    on reporting_ocpusagelineitem_daily using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        # ocp usage line item daily summary
        migrations.RunSQL(
            """
/* add namespace index for like trigram ops */
create index if not exists ocp_summary_namespace_like_idx
    on reporting_ocpusagelineitem_daily_summary using gin (UPPER(namespace) gin_trgm_ops);

/* add node index for like trigram ops */
create index if not exists ocp_summary_node_like_idx
    on reporting_ocpusagelineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        # reporting_ocpstoragelineitem_daily
        migrations.RunSQL(
            """
/* add namespace index for like trigram ops */
create index if not exists ocp_storage_li_namespace_like_idx
    on reporting_ocpstoragelineitem_daily using gin (UPPER(namespace) gin_trgm_ops);

/* add node index for like trigram ops */
create index if not exists ocp_storage_li_node_like_idx
    on reporting_ocpstoragelineitem_daily using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        # ocp azure cost
        migrations.RunSQL(
            """
/* add node index for like trigram ops */
create index if not exists ocpazure_node_like_idx
    on reporting_ocpazurecostlineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        # ocp azure project cost
        migrations.RunSQL(
            """
/* add namespace index for like trigram ops */
create index if not exists ocpazure_proj_namespace_like_idx
    on reporting_ocpazurecostlineitem_project_daily_summary using gin (UPPER(namespace) gin_trgm_ops);

/* add node index for like trigram ops */
create index if not exists ocpazure_proj_node_like_idx
    on reporting_ocpazurecostlineitem_project_daily_summary using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        # reporting_ocpawscostlineitem_daily_summary
        migrations.RunSQL(
            """
/* add node index for like trigram ops */
create index if not exists cost_summary_node_like_idx
    on reporting_ocpawscostlineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        # reporting_ocpawscostlineitem_project_daily_summary
        migrations.RunSQL(
            """
/* add namespace index for like trigram ops */
create index if not exists cost__proj_sum_namespace_like_idx
    on reporting_ocpawscostlineitem_project_daily_summary using gin (UPPER(namespace) gin_trgm_ops);

/* add node index for like trigram ops */
create index if not exists cost__proj_sum_node_like_idx
    on reporting_ocpawscostlineitem_project_daily_summary using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        # reporting_ocpcosts_summary
        migrations.RunSQL(
            """
/* add namespace index for like trigram ops */
create index if not exists ocpcostsum_namespace_like_idx
    on reporting_ocpcosts_summary using gin (UPPER(namespace) gin_trgm_ops);

/* add node index for like trigram ops */
create index if not exists ocpcostsum_node_like_idx
    on reporting_ocpcosts_summary using gin (UPPER(node) gin_trgm_ops);
            """
        ),
        migrations.RunSQL(
            """
drop materialized view if exists reporting_ocpallcostlineitem_daily_summary;

create materialized view if not exists reporting_ocpallcostlineitem_daily_summary as
 SELECT row_number() OVER () AS id,
    lids.source_type,
    lids.cluster_id,
    lids.cluster_alias,
    lids.namespace,
    lids.node,
    lids.resource_id,
    lids.usage_start,
    lids.usage_end,
    lids.usage_account_id,
    lids.account_alias_id,
    lids.product_code,
    lids.product_family,
    lids.instance_type,
    lids.region,
    lids.availability_zone,
    lids.tags,
    lids.usage_amount,
    lids.unit,
    lids.unblended_cost,
    lids.markup_cost,
    lids.currency_code,
    lids.shared_projects,
    lids.project_costs
   FROM ( SELECT 'AWS'::text AS source_type,
            reporting_ocpawscostlineitem_daily_summary.cluster_id,
            reporting_ocpawscostlineitem_daily_summary.cluster_alias,
            reporting_ocpawscostlineitem_daily_summary.namespace,
            reporting_ocpawscostlineitem_daily_summary.node,
            reporting_ocpawscostlineitem_daily_summary.resource_id,
            reporting_ocpawscostlineitem_daily_summary.usage_start::date,
            reporting_ocpawscostlineitem_daily_summary.usage_end::date,
            reporting_ocpawscostlineitem_daily_summary.usage_account_id,
            reporting_ocpawscostlineitem_daily_summary.account_alias_id,
            reporting_ocpawscostlineitem_daily_summary.product_code,
            reporting_ocpawscostlineitem_daily_summary.product_family,
            reporting_ocpawscostlineitem_daily_summary.instance_type,
            reporting_ocpawscostlineitem_daily_summary.region,
            reporting_ocpawscostlineitem_daily_summary.availability_zone,
            reporting_ocpawscostlineitem_daily_summary.tags,
            reporting_ocpawscostlineitem_daily_summary.usage_amount,
            reporting_ocpawscostlineitem_daily_summary.unit,
            reporting_ocpawscostlineitem_daily_summary.unblended_cost,
            reporting_ocpawscostlineitem_daily_summary.markup_cost,
            reporting_ocpawscostlineitem_daily_summary.currency_code,
            reporting_ocpawscostlineitem_daily_summary.shared_projects,
            reporting_ocpawscostlineitem_daily_summary.project_costs
           FROM reporting_ocpawscostlineitem_daily_summary
          WHERE reporting_ocpawscostlineitem_daily_summary.usage_start >= date_trunc('month'::text, date_trunc('month'::text, now()) - '1 day'::interval day)
        UNION
         SELECT 'Azure'::text AS source_type,
            reporting_ocpazurecostlineitem_daily_summary.cluster_id,
            reporting_ocpazurecostlineitem_daily_summary.cluster_alias,
            reporting_ocpazurecostlineitem_daily_summary.namespace,
            reporting_ocpazurecostlineitem_daily_summary.node,
            reporting_ocpazurecostlineitem_daily_summary.resource_id,
            reporting_ocpazurecostlineitem_daily_summary.usage_start::date,
            reporting_ocpazurecostlineitem_daily_summary.usage_end::date,
            reporting_ocpazurecostlineitem_daily_summary.subscription_guid AS usage_account_id,
            NULL::integer AS account_alias_id,
            reporting_ocpazurecostlineitem_daily_summary.service_name AS product_code,
            NULL::character varying AS product_family,
            reporting_ocpazurecostlineitem_daily_summary.instance_type,
            reporting_ocpazurecostlineitem_daily_summary.resource_location AS region,
            NULL::character varying AS availability_zone,
            reporting_ocpazurecostlineitem_daily_summary.tags,
            reporting_ocpazurecostlineitem_daily_summary.usage_quantity AS usage_amount,
            reporting_ocpazurecostlineitem_daily_summary.unit_of_measure AS unit,
            reporting_ocpazurecostlineitem_daily_summary.pretax_cost AS unblended_cost,
            reporting_ocpazurecostlineitem_daily_summary.markup_cost,
            reporting_ocpazurecostlineitem_daily_summary.currency AS currency_code,
            reporting_ocpazurecostlineitem_daily_summary.shared_projects,
            reporting_ocpazurecostlineitem_daily_summary.project_costs
           FROM reporting_ocpazurecostlineitem_daily_summary
          WHERE reporting_ocpazurecostlineitem_daily_summary.usage_start >= date_trunc('month'::text, date_trunc('month'::text, now()) - '1 day'::interval day)) lids
          with no data;

create index mv_reporting_ocpallcostlineitem_daily_summary_namespace_ix
    on reporting_ocpallcostlineitem_daily_summary using gin (namespace);
create index mv_reporting_ocpallcostlineitem_daily_summary_node_ix
    on reporting_ocpallcostlineitem_daily_summary (node varchar_pattern_ops);
create index mv_reporting_ocpallcostlineitem_daily_summary_usage_ix
    on reporting_ocpallcostlineitem_daily_summary (usage_start);


drop materialized view if exists reporting_ocpallcostlineitem_project_daily_summary;

create materialized view if not exists reporting_ocpallcostlineitem_project_daily_summary as
 SELECT row_number() OVER () AS id,
    lids.source_type,
    lids.cluster_id,
    lids.cluster_alias,
    lids.data_source,
    lids.namespace,
    lids.node,
    lids.pod_labels,
    lids.resource_id,
    lids.usage_start,
    lids.usage_end,
    lids.usage_account_id,
    lids.account_alias_id,
    lids.product_code,
    lids.product_family,
    lids.instance_type,
    lids.region,
    lids.availability_zone,
    lids.usage_amount,
    lids.unit,
    lids.unblended_cost,
    lids.project_markup_cost,
    lids.pod_cost,
    lids.currency_code
   FROM ( SELECT 'AWS'::text AS source_type,
            reporting_ocpawscostlineitem_project_daily_summary.cluster_id,
            reporting_ocpawscostlineitem_project_daily_summary.cluster_alias,
            reporting_ocpawscostlineitem_project_daily_summary.data_source,
            reporting_ocpawscostlineitem_project_daily_summary.namespace,
            reporting_ocpawscostlineitem_project_daily_summary.node,
            reporting_ocpawscostlineitem_project_daily_summary.pod_labels,
            reporting_ocpawscostlineitem_project_daily_summary.resource_id,
            reporting_ocpawscostlineitem_project_daily_summary.usage_start::date,
            reporting_ocpawscostlineitem_project_daily_summary.usage_end::date,
            reporting_ocpawscostlineitem_project_daily_summary.usage_account_id,
            reporting_ocpawscostlineitem_project_daily_summary.account_alias_id,
            reporting_ocpawscostlineitem_project_daily_summary.product_code,
            reporting_ocpawscostlineitem_project_daily_summary.product_family,
            reporting_ocpawscostlineitem_project_daily_summary.instance_type,
            reporting_ocpawscostlineitem_project_daily_summary.region,
            reporting_ocpawscostlineitem_project_daily_summary.availability_zone,
            reporting_ocpawscostlineitem_project_daily_summary.usage_amount,
            reporting_ocpawscostlineitem_project_daily_summary.unit,
            reporting_ocpawscostlineitem_project_daily_summary.unblended_cost,
            reporting_ocpawscostlineitem_project_daily_summary.project_markup_cost,
            reporting_ocpawscostlineitem_project_daily_summary.pod_cost,
            reporting_ocpawscostlineitem_project_daily_summary.currency_code
           FROM reporting_ocpawscostlineitem_project_daily_summary
          WHERE reporting_ocpawscostlineitem_project_daily_summary.usage_start >= date_trunc('month'::text, date_trunc('month'::text, now()) - '1 day'::interval day)
        UNION
         SELECT 'Azure'::text AS source_type,
            reporting_ocpazurecostlineitem_project_daily_summary.cluster_id,
            reporting_ocpazurecostlineitem_project_daily_summary.cluster_alias,
            reporting_ocpazurecostlineitem_project_daily_summary.data_source,
            reporting_ocpazurecostlineitem_project_daily_summary.namespace,
            reporting_ocpazurecostlineitem_project_daily_summary.node,
            reporting_ocpazurecostlineitem_project_daily_summary.pod_labels,
            reporting_ocpazurecostlineitem_project_daily_summary.resource_id,
            reporting_ocpazurecostlineitem_project_daily_summary.usage_start::date,
            reporting_ocpazurecostlineitem_project_daily_summary.usage_end::date,
            reporting_ocpazurecostlineitem_project_daily_summary.subscription_guid AS usage_account_id,
            NULL::integer AS account_alias_id,
            reporting_ocpazurecostlineitem_project_daily_summary.service_name AS product_code,
            NULL::character varying AS product_family,
            reporting_ocpazurecostlineitem_project_daily_summary.instance_type,
            reporting_ocpazurecostlineitem_project_daily_summary.resource_location AS region,
            NULL::character varying AS availability_zone,
            reporting_ocpazurecostlineitem_project_daily_summary.usage_quantity AS usage_amount,
            reporting_ocpazurecostlineitem_project_daily_summary.unit_of_measure AS unit,
            reporting_ocpazurecostlineitem_project_daily_summary.pretax_cost AS unblended_cost,
            reporting_ocpazurecostlineitem_project_daily_summary.project_markup_cost,
            reporting_ocpazurecostlineitem_project_daily_summary.pod_cost,
            reporting_ocpazurecostlineitem_project_daily_summary.currency AS currency_code
           FROM reporting_ocpazurecostlineitem_project_daily_summary
          WHERE reporting_ocpazurecostlineitem_project_daily_summary.usage_start >= date_trunc('month'::text, date_trunc('month'::text, now()) - '1 day'::interval day)) lids
          with no data;

create index mv_reporting_ocpallcostlineitem_prj_daily_summary_namespace_ix
    on reporting_ocpallcostlineitem_project_daily_summary (namespace varchar_pattern_ops);
create index mv_reporting_ocpallcostlineitem_prj_daily_summary_node_ix
    on reporting_ocpallcostlineitem_project_daily_summary (node varchar_pattern_ops);
create index mv_reporting_ocpallcostlineitem_prj_daily_summary_namespace_like_ix
    on reporting_ocpallcostlineitem_project_daily_summary using gin (namespace gin_trgm_ops);
create index mv_reporting_ocpallcostlineitem_prj_daily_summary_node_like_ix
    on reporting_ocpallcostlineitem_project_daily_summary using gin (node gin_trgm_ops);
create index mv_reporting_ocpallcostlineitem_prj_daily_summary_usage_ix
    on reporting_ocpallcostlineitem_project_daily_summary (usage_start);
            """
        ),
        migrations.RunSQL(
            """
refresh materialized view reporting_ocpallcostlineitem_daily_summary;
refresh materialized view reporting_ocpallcostlineitem_project_daily_summary;
            """
        ),
    ]

[((12, 8, 17, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(13, 12, 16, 15): '"""\ndrop materialized view if exists reporting_ocpallcostlineitem_daily_summary;\ndrop materialized view if exists reporting_ocpallcostlineitem_project_daily_summary;\n            """'}, {}), '(\n    """\ndrop materialized view if exists reporting_ocpallcostlineitem_daily_summary;\ndrop materialized view if exists reporting_ocpallcostlineitem_project_daily_summary;\n            """\n    )', False, 'from django.db import migrations\n'), ((18, 8, 18, 105), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((19, 8, 21, 9), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((22, 8, 22, 113), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((23, 8, 23, 103), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((24, 8, 26, 9), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((27, 8, 27, 115), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((28, 8, 28, 88), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((29, 8, 29, 83), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((30, 8, 30, 103), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((31, 8, 31, 98), 'django.db.migrations.RemoveIndex', 'migrations.RemoveIndex', (), '', False, 'from django.db import migrations\n'), ((132, 8, 136, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(133, 12, 135, 15): '"""\ncreate extension if not exists pg_trgm schema public;\n            """'}, {}), '(\n    """\ncreate extension if not exists pg_trgm schema public;\n            """)', False, 'from django.db import migrations\n'), ((141, 8, 151, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(142, 12, 150, 15): '"""\n/* add namespace index for like trigram ops */\ncreate index if not exists ocp_namespace_idx\n    on  reporting_ocpusagelineitem_daily using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocp_node_idx\n    on reporting_ocpusagelineitem_daily using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add namespace index for like trigram ops */\ncreate index if not exists ocp_namespace_idx\n    on  reporting_ocpusagelineitem_daily using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocp_node_idx\n    on reporting_ocpusagelineitem_daily using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((153, 8, 163, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(154, 12, 162, 15): '"""\n/* add namespace index for like trigram ops */\ncreate index if not exists ocp_summary_namespace_like_idx\n    on reporting_ocpusagelineitem_daily_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocp_summary_node_like_idx\n    on reporting_ocpusagelineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add namespace index for like trigram ops */\ncreate index if not exists ocp_summary_namespace_like_idx\n    on reporting_ocpusagelineitem_daily_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocp_summary_node_like_idx\n    on reporting_ocpusagelineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((165, 8, 175, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(166, 12, 174, 15): '"""\n/* add namespace index for like trigram ops */\ncreate index if not exists ocp_storage_li_namespace_like_idx\n    on reporting_ocpstoragelineitem_daily using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocp_storage_li_node_like_idx\n    on reporting_ocpstoragelineitem_daily using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add namespace index for like trigram ops */\ncreate index if not exists ocp_storage_li_namespace_like_idx\n    on reporting_ocpstoragelineitem_daily using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocp_storage_li_node_like_idx\n    on reporting_ocpstoragelineitem_daily using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((177, 8, 183, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(178, 12, 182, 15): '"""\n/* add node index for like trigram ops */\ncreate index if not exists ocpazure_node_like_idx\n    on reporting_ocpazurecostlineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add node index for like trigram ops */\ncreate index if not exists ocpazure_node_like_idx\n    on reporting_ocpazurecostlineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((185, 8, 195, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(186, 12, 194, 15): '"""\n/* add namespace index for like trigram ops */\ncreate index if not exists ocpazure_proj_namespace_like_idx\n    on reporting_ocpazurecostlineitem_project_daily_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocpazure_proj_node_like_idx\n    on reporting_ocpazurecostlineitem_project_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add namespace index for like trigram ops */\ncreate index if not exists ocpazure_proj_namespace_like_idx\n    on reporting_ocpazurecostlineitem_project_daily_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocpazure_proj_node_like_idx\n    on reporting_ocpazurecostlineitem_project_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((197, 8, 203, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(198, 12, 202, 15): '"""\n/* add node index for like trigram ops */\ncreate index if not exists cost_summary_node_like_idx\n    on reporting_ocpawscostlineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add node index for like trigram ops */\ncreate index if not exists cost_summary_node_like_idx\n    on reporting_ocpawscostlineitem_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((205, 8, 215, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(206, 12, 214, 15): '"""\n/* add namespace index for like trigram ops */\ncreate index if not exists cost__proj_sum_namespace_like_idx\n    on reporting_ocpawscostlineitem_project_daily_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists cost__proj_sum_node_like_idx\n    on reporting_ocpawscostlineitem_project_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add namespace index for like trigram ops */\ncreate index if not exists cost__proj_sum_namespace_like_idx\n    on reporting_ocpawscostlineitem_project_daily_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists cost__proj_sum_node_like_idx\n    on reporting_ocpawscostlineitem_project_daily_summary using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((217, 8, 227, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(218, 12, 226, 15): '"""\n/* add namespace index for like trigram ops */\ncreate index if not exists ocpcostsum_namespace_like_idx\n    on reporting_ocpcosts_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocpcostsum_node_like_idx\n    on reporting_ocpcosts_summary using gin (UPPER(node) gin_trgm_ops);\n            """'}, {}), '(\n    """\n/* add namespace index for like trigram ops */\ncreate index if not exists ocpcostsum_namespace_like_idx\n    on reporting_ocpcosts_summary using gin (UPPER(namespace) gin_trgm_ops);\n\n/* add node index for like trigram ops */\ncreate index if not exists ocpcostsum_node_like_idx\n    on reporting_ocpcosts_summary using gin (UPPER(node) gin_trgm_ops);\n            """\n    )', False, 'from django.db import migrations\n'), ((228, 8, 409, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(229, 12, 408, 15): '"""\ndrop materialized view if exists reporting_ocpallcostlineitem_daily_summary;\n\ncreate materialized view if not exists reporting_ocpallcostlineitem_daily_summary as\n SELECT row_number() OVER () AS id,\n    lids.source_type,\n    lids.cluster_id,\n    lids.cluster_alias,\n    lids.namespace,\n    lids.node,\n    lids.resource_id,\n    lids.usage_start,\n    lids.usage_end,\n    lids.usage_account_id,\n    lids.account_alias_id,\n    lids.product_code,\n    lids.product_family,\n    lids.instance_type,\n    lids.region,\n    lids.availability_zone,\n    lids.tags,\n    lids.usage_amount,\n    lids.unit,\n    lids.unblended_cost,\n    lids.markup_cost,\n    lids.currency_code,\n    lids.shared_projects,\n    lids.project_costs\n   FROM ( SELECT \'AWS\'::text AS source_type,\n            reporting_ocpawscostlineitem_daily_summary.cluster_id,\n            reporting_ocpawscostlineitem_daily_summary.cluster_alias,\n            reporting_ocpawscostlineitem_daily_summary.namespace,\n            reporting_ocpawscostlineitem_daily_summary.node,\n            reporting_ocpawscostlineitem_daily_summary.resource_id,\n            reporting_ocpawscostlineitem_daily_summary.usage_start::date,\n            reporting_ocpawscostlineitem_daily_summary.usage_end::date,\n            reporting_ocpawscostlineitem_daily_summary.usage_account_id,\n            reporting_ocpawscostlineitem_daily_summary.account_alias_id,\n            reporting_ocpawscostlineitem_daily_summary.product_code,\n            reporting_ocpawscostlineitem_daily_summary.product_family,\n            reporting_ocpawscostlineitem_daily_summary.instance_type,\n            reporting_ocpawscostlineitem_daily_summary.region,\n            reporting_ocpawscostlineitem_daily_summary.availability_zone,\n            reporting_ocpawscostlineitem_daily_summary.tags,\n            reporting_ocpawscostlineitem_daily_summary.usage_amount,\n            reporting_ocpawscostlineitem_daily_summary.unit,\n            reporting_ocpawscostlineitem_daily_summary.unblended_cost,\n            reporting_ocpawscostlineitem_daily_summary.markup_cost,\n            reporting_ocpawscostlineitem_daily_summary.currency_code,\n            reporting_ocpawscostlineitem_daily_summary.shared_projects,\n            reporting_ocpawscostlineitem_daily_summary.project_costs\n           FROM reporting_ocpawscostlineitem_daily_summary\n          WHERE reporting_ocpawscostlineitem_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)\n        UNION\n         SELECT \'Azure\'::text AS source_type,\n            reporting_ocpazurecostlineitem_daily_summary.cluster_id,\n            reporting_ocpazurecostlineitem_daily_summary.cluster_alias,\n            reporting_ocpazurecostlineitem_daily_summary.namespace,\n            reporting_ocpazurecostlineitem_daily_summary.node,\n            reporting_ocpazurecostlineitem_daily_summary.resource_id,\n            reporting_ocpazurecostlineitem_daily_summary.usage_start::date,\n            reporting_ocpazurecostlineitem_daily_summary.usage_end::date,\n            reporting_ocpazurecostlineitem_daily_summary.subscription_guid AS usage_account_id,\n            NULL::integer AS account_alias_id,\n            reporting_ocpazurecostlineitem_daily_summary.service_name AS product_code,\n            NULL::character varying AS product_family,\n            reporting_ocpazurecostlineitem_daily_summary.instance_type,\n            reporting_ocpazurecostlineitem_daily_summary.resource_location AS region,\n            NULL::character varying AS availability_zone,\n            reporting_ocpazurecostlineitem_daily_summary.tags,\n            reporting_ocpazurecostlineitem_daily_summary.usage_quantity AS usage_amount,\n            reporting_ocpazurecostlineitem_daily_summary.unit_of_measure AS unit,\n            reporting_ocpazurecostlineitem_daily_summary.pretax_cost AS unblended_cost,\n            reporting_ocpazurecostlineitem_daily_summary.markup_cost,\n            reporting_ocpazurecostlineitem_daily_summary.currency AS currency_code,\n            reporting_ocpazurecostlineitem_daily_summary.shared_projects,\n            reporting_ocpazurecostlineitem_daily_summary.project_costs\n           FROM reporting_ocpazurecostlineitem_daily_summary\n          WHERE reporting_ocpazurecostlineitem_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)) lids\n          with no data;\n\ncreate index mv_reporting_ocpallcostlineitem_daily_summary_namespace_ix\n    on reporting_ocpallcostlineitem_daily_summary using gin (namespace);\ncreate index mv_reporting_ocpallcostlineitem_daily_summary_node_ix\n    on reporting_ocpallcostlineitem_daily_summary (node varchar_pattern_ops);\ncreate index mv_reporting_ocpallcostlineitem_daily_summary_usage_ix\n    on reporting_ocpallcostlineitem_daily_summary (usage_start);\n\n\ndrop materialized view if exists reporting_ocpallcostlineitem_project_daily_summary;\n\ncreate materialized view if not exists reporting_ocpallcostlineitem_project_daily_summary as\n SELECT row_number() OVER () AS id,\n    lids.source_type,\n    lids.cluster_id,\n    lids.cluster_alias,\n    lids.data_source,\n    lids.namespace,\n    lids.node,\n    lids.pod_labels,\n    lids.resource_id,\n    lids.usage_start,\n    lids.usage_end,\n    lids.usage_account_id,\n    lids.account_alias_id,\n    lids.product_code,\n    lids.product_family,\n    lids.instance_type,\n    lids.region,\n    lids.availability_zone,\n    lids.usage_amount,\n    lids.unit,\n    lids.unblended_cost,\n    lids.project_markup_cost,\n    lids.pod_cost,\n    lids.currency_code\n   FROM ( SELECT \'AWS\'::text AS source_type,\n            reporting_ocpawscostlineitem_project_daily_summary.cluster_id,\n            reporting_ocpawscostlineitem_project_daily_summary.cluster_alias,\n            reporting_ocpawscostlineitem_project_daily_summary.data_source,\n            reporting_ocpawscostlineitem_project_daily_summary.namespace,\n            reporting_ocpawscostlineitem_project_daily_summary.node,\n            reporting_ocpawscostlineitem_project_daily_summary.pod_labels,\n            reporting_ocpawscostlineitem_project_daily_summary.resource_id,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_start::date,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_end::date,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_account_id,\n            reporting_ocpawscostlineitem_project_daily_summary.account_alias_id,\n            reporting_ocpawscostlineitem_project_daily_summary.product_code,\n            reporting_ocpawscostlineitem_project_daily_summary.product_family,\n            reporting_ocpawscostlineitem_project_daily_summary.instance_type,\n            reporting_ocpawscostlineitem_project_daily_summary.region,\n            reporting_ocpawscostlineitem_project_daily_summary.availability_zone,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_amount,\n            reporting_ocpawscostlineitem_project_daily_summary.unit,\n            reporting_ocpawscostlineitem_project_daily_summary.unblended_cost,\n            reporting_ocpawscostlineitem_project_daily_summary.project_markup_cost,\n            reporting_ocpawscostlineitem_project_daily_summary.pod_cost,\n            reporting_ocpawscostlineitem_project_daily_summary.currency_code\n           FROM reporting_ocpawscostlineitem_project_daily_summary\n          WHERE reporting_ocpawscostlineitem_project_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)\n        UNION\n         SELECT \'Azure\'::text AS source_type,\n            reporting_ocpazurecostlineitem_project_daily_summary.cluster_id,\n            reporting_ocpazurecostlineitem_project_daily_summary.cluster_alias,\n            reporting_ocpazurecostlineitem_project_daily_summary.data_source,\n            reporting_ocpazurecostlineitem_project_daily_summary.namespace,\n            reporting_ocpazurecostlineitem_project_daily_summary.node,\n            reporting_ocpazurecostlineitem_project_daily_summary.pod_labels,\n            reporting_ocpazurecostlineitem_project_daily_summary.resource_id,\n            reporting_ocpazurecostlineitem_project_daily_summary.usage_start::date,\n            reporting_ocpazurecostlineitem_project_daily_summary.usage_end::date,\n            reporting_ocpazurecostlineitem_project_daily_summary.subscription_guid AS usage_account_id,\n            NULL::integer AS account_alias_id,\n            reporting_ocpazurecostlineitem_project_daily_summary.service_name AS product_code,\n            NULL::character varying AS product_family,\n            reporting_ocpazurecostlineitem_project_daily_summary.instance_type,\n            reporting_ocpazurecostlineitem_project_daily_summary.resource_location AS region,\n            NULL::character varying AS availability_zone,\n            reporting_ocpazurecostlineitem_project_daily_summary.usage_quantity AS usage_amount,\n            reporting_ocpazurecostlineitem_project_daily_summary.unit_of_measure AS unit,\n            reporting_ocpazurecostlineitem_project_daily_summary.pretax_cost AS unblended_cost,\n            reporting_ocpazurecostlineitem_project_daily_summary.project_markup_cost,\n            reporting_ocpazurecostlineitem_project_daily_summary.pod_cost,\n            reporting_ocpazurecostlineitem_project_daily_summary.currency AS currency_code\n           FROM reporting_ocpazurecostlineitem_project_daily_summary\n          WHERE reporting_ocpazurecostlineitem_project_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)) lids\n          with no data;\n\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_namespace_ix\n    on reporting_ocpallcostlineitem_project_daily_summary (namespace varchar_pattern_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_node_ix\n    on reporting_ocpallcostlineitem_project_daily_summary (node varchar_pattern_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_namespace_like_ix\n    on reporting_ocpallcostlineitem_project_daily_summary using gin (namespace gin_trgm_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_node_like_ix\n    on reporting_ocpallcostlineitem_project_daily_summary using gin (node gin_trgm_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_usage_ix\n    on reporting_ocpallcostlineitem_project_daily_summary (usage_start);\n            """'}, {}), '(\n    """\ndrop materialized view if exists reporting_ocpallcostlineitem_daily_summary;\n\ncreate materialized view if not exists reporting_ocpallcostlineitem_daily_summary as\n SELECT row_number() OVER () AS id,\n    lids.source_type,\n    lids.cluster_id,\n    lids.cluster_alias,\n    lids.namespace,\n    lids.node,\n    lids.resource_id,\n    lids.usage_start,\n    lids.usage_end,\n    lids.usage_account_id,\n    lids.account_alias_id,\n    lids.product_code,\n    lids.product_family,\n    lids.instance_type,\n    lids.region,\n    lids.availability_zone,\n    lids.tags,\n    lids.usage_amount,\n    lids.unit,\n    lids.unblended_cost,\n    lids.markup_cost,\n    lids.currency_code,\n    lids.shared_projects,\n    lids.project_costs\n   FROM ( SELECT \'AWS\'::text AS source_type,\n            reporting_ocpawscostlineitem_daily_summary.cluster_id,\n            reporting_ocpawscostlineitem_daily_summary.cluster_alias,\n            reporting_ocpawscostlineitem_daily_summary.namespace,\n            reporting_ocpawscostlineitem_daily_summary.node,\n            reporting_ocpawscostlineitem_daily_summary.resource_id,\n            reporting_ocpawscostlineitem_daily_summary.usage_start::date,\n            reporting_ocpawscostlineitem_daily_summary.usage_end::date,\n            reporting_ocpawscostlineitem_daily_summary.usage_account_id,\n            reporting_ocpawscostlineitem_daily_summary.account_alias_id,\n            reporting_ocpawscostlineitem_daily_summary.product_code,\n            reporting_ocpawscostlineitem_daily_summary.product_family,\n            reporting_ocpawscostlineitem_daily_summary.instance_type,\n            reporting_ocpawscostlineitem_daily_summary.region,\n            reporting_ocpawscostlineitem_daily_summary.availability_zone,\n            reporting_ocpawscostlineitem_daily_summary.tags,\n            reporting_ocpawscostlineitem_daily_summary.usage_amount,\n            reporting_ocpawscostlineitem_daily_summary.unit,\n            reporting_ocpawscostlineitem_daily_summary.unblended_cost,\n            reporting_ocpawscostlineitem_daily_summary.markup_cost,\n            reporting_ocpawscostlineitem_daily_summary.currency_code,\n            reporting_ocpawscostlineitem_daily_summary.shared_projects,\n            reporting_ocpawscostlineitem_daily_summary.project_costs\n           FROM reporting_ocpawscostlineitem_daily_summary\n          WHERE reporting_ocpawscostlineitem_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)\n        UNION\n         SELECT \'Azure\'::text AS source_type,\n            reporting_ocpazurecostlineitem_daily_summary.cluster_id,\n            reporting_ocpazurecostlineitem_daily_summary.cluster_alias,\n            reporting_ocpazurecostlineitem_daily_summary.namespace,\n            reporting_ocpazurecostlineitem_daily_summary.node,\n            reporting_ocpazurecostlineitem_daily_summary.resource_id,\n            reporting_ocpazurecostlineitem_daily_summary.usage_start::date,\n            reporting_ocpazurecostlineitem_daily_summary.usage_end::date,\n            reporting_ocpazurecostlineitem_daily_summary.subscription_guid AS usage_account_id,\n            NULL::integer AS account_alias_id,\n            reporting_ocpazurecostlineitem_daily_summary.service_name AS product_code,\n            NULL::character varying AS product_family,\n            reporting_ocpazurecostlineitem_daily_summary.instance_type,\n            reporting_ocpazurecostlineitem_daily_summary.resource_location AS region,\n            NULL::character varying AS availability_zone,\n            reporting_ocpazurecostlineitem_daily_summary.tags,\n            reporting_ocpazurecostlineitem_daily_summary.usage_quantity AS usage_amount,\n            reporting_ocpazurecostlineitem_daily_summary.unit_of_measure AS unit,\n            reporting_ocpazurecostlineitem_daily_summary.pretax_cost AS unblended_cost,\n            reporting_ocpazurecostlineitem_daily_summary.markup_cost,\n            reporting_ocpazurecostlineitem_daily_summary.currency AS currency_code,\n            reporting_ocpazurecostlineitem_daily_summary.shared_projects,\n            reporting_ocpazurecostlineitem_daily_summary.project_costs\n           FROM reporting_ocpazurecostlineitem_daily_summary\n          WHERE reporting_ocpazurecostlineitem_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)) lids\n          with no data;\n\ncreate index mv_reporting_ocpallcostlineitem_daily_summary_namespace_ix\n    on reporting_ocpallcostlineitem_daily_summary using gin (namespace);\ncreate index mv_reporting_ocpallcostlineitem_daily_summary_node_ix\n    on reporting_ocpallcostlineitem_daily_summary (node varchar_pattern_ops);\ncreate index mv_reporting_ocpallcostlineitem_daily_summary_usage_ix\n    on reporting_ocpallcostlineitem_daily_summary (usage_start);\n\n\ndrop materialized view if exists reporting_ocpallcostlineitem_project_daily_summary;\n\ncreate materialized view if not exists reporting_ocpallcostlineitem_project_daily_summary as\n SELECT row_number() OVER () AS id,\n    lids.source_type,\n    lids.cluster_id,\n    lids.cluster_alias,\n    lids.data_source,\n    lids.namespace,\n    lids.node,\n    lids.pod_labels,\n    lids.resource_id,\n    lids.usage_start,\n    lids.usage_end,\n    lids.usage_account_id,\n    lids.account_alias_id,\n    lids.product_code,\n    lids.product_family,\n    lids.instance_type,\n    lids.region,\n    lids.availability_zone,\n    lids.usage_amount,\n    lids.unit,\n    lids.unblended_cost,\n    lids.project_markup_cost,\n    lids.pod_cost,\n    lids.currency_code\n   FROM ( SELECT \'AWS\'::text AS source_type,\n            reporting_ocpawscostlineitem_project_daily_summary.cluster_id,\n            reporting_ocpawscostlineitem_project_daily_summary.cluster_alias,\n            reporting_ocpawscostlineitem_project_daily_summary.data_source,\n            reporting_ocpawscostlineitem_project_daily_summary.namespace,\n            reporting_ocpawscostlineitem_project_daily_summary.node,\n            reporting_ocpawscostlineitem_project_daily_summary.pod_labels,\n            reporting_ocpawscostlineitem_project_daily_summary.resource_id,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_start::date,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_end::date,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_account_id,\n            reporting_ocpawscostlineitem_project_daily_summary.account_alias_id,\n            reporting_ocpawscostlineitem_project_daily_summary.product_code,\n            reporting_ocpawscostlineitem_project_daily_summary.product_family,\n            reporting_ocpawscostlineitem_project_daily_summary.instance_type,\n            reporting_ocpawscostlineitem_project_daily_summary.region,\n            reporting_ocpawscostlineitem_project_daily_summary.availability_zone,\n            reporting_ocpawscostlineitem_project_daily_summary.usage_amount,\n            reporting_ocpawscostlineitem_project_daily_summary.unit,\n            reporting_ocpawscostlineitem_project_daily_summary.unblended_cost,\n            reporting_ocpawscostlineitem_project_daily_summary.project_markup_cost,\n            reporting_ocpawscostlineitem_project_daily_summary.pod_cost,\n            reporting_ocpawscostlineitem_project_daily_summary.currency_code\n           FROM reporting_ocpawscostlineitem_project_daily_summary\n          WHERE reporting_ocpawscostlineitem_project_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)\n        UNION\n         SELECT \'Azure\'::text AS source_type,\n            reporting_ocpazurecostlineitem_project_daily_summary.cluster_id,\n            reporting_ocpazurecostlineitem_project_daily_summary.cluster_alias,\n            reporting_ocpazurecostlineitem_project_daily_summary.data_source,\n            reporting_ocpazurecostlineitem_project_daily_summary.namespace,\n            reporting_ocpazurecostlineitem_project_daily_summary.node,\n            reporting_ocpazurecostlineitem_project_daily_summary.pod_labels,\n            reporting_ocpazurecostlineitem_project_daily_summary.resource_id,\n            reporting_ocpazurecostlineitem_project_daily_summary.usage_start::date,\n            reporting_ocpazurecostlineitem_project_daily_summary.usage_end::date,\n            reporting_ocpazurecostlineitem_project_daily_summary.subscription_guid AS usage_account_id,\n            NULL::integer AS account_alias_id,\n            reporting_ocpazurecostlineitem_project_daily_summary.service_name AS product_code,\n            NULL::character varying AS product_family,\n            reporting_ocpazurecostlineitem_project_daily_summary.instance_type,\n            reporting_ocpazurecostlineitem_project_daily_summary.resource_location AS region,\n            NULL::character varying AS availability_zone,\n            reporting_ocpazurecostlineitem_project_daily_summary.usage_quantity AS usage_amount,\n            reporting_ocpazurecostlineitem_project_daily_summary.unit_of_measure AS unit,\n            reporting_ocpazurecostlineitem_project_daily_summary.pretax_cost AS unblended_cost,\n            reporting_ocpazurecostlineitem_project_daily_summary.project_markup_cost,\n            reporting_ocpazurecostlineitem_project_daily_summary.pod_cost,\n            reporting_ocpazurecostlineitem_project_daily_summary.currency AS currency_code\n           FROM reporting_ocpazurecostlineitem_project_daily_summary\n          WHERE reporting_ocpazurecostlineitem_project_daily_summary.usage_start >= date_trunc(\'month\'::text, date_trunc(\'month\'::text, now()) - \'1 day\'::interval day)) lids\n          with no data;\n\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_namespace_ix\n    on reporting_ocpallcostlineitem_project_daily_summary (namespace varchar_pattern_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_node_ix\n    on reporting_ocpallcostlineitem_project_daily_summary (node varchar_pattern_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_namespace_like_ix\n    on reporting_ocpallcostlineitem_project_daily_summary using gin (namespace gin_trgm_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_node_like_ix\n    on reporting_ocpallcostlineitem_project_daily_summary using gin (node gin_trgm_ops);\ncreate index mv_reporting_ocpallcostlineitem_prj_daily_summary_usage_ix\n    on reporting_ocpallcostlineitem_project_daily_summary (usage_start);\n            """\n    )', False, 'from django.db import migrations\n'), ((410, 8, 415, 9), 'django.db.migrations.RunSQL', 'migrations.RunSQL', ({(411, 12, 414, 15): '"""\nrefresh materialized view reporting_ocpallcostlineitem_daily_summary;\nrefresh materialized view reporting_ocpallcostlineitem_project_daily_summary;\n            """'}, {}), '(\n    """\nrefresh materialized view reporting_ocpallcostlineitem_daily_summary;\nrefresh materialized view reporting_ocpallcostlineitem_project_daily_summary;\n            """\n    )', False, 'from django.db import migrations\n'), ((33, 88, 33, 106), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((36, 90, 36, 108), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((39, 83, 39, 101), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((42, 85, 42, 103), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((45, 90, 45, 108), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((48, 92, 48, 110), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((50, 92, 50, 110), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((51, 94, 51, 112), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((52, 94, 52, 115), 'django.db.models.IntegerField', 'models.IntegerField', ({}, {}), '()', False, 'from django.db import models\n'), ((53, 90, 53, 108), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((54, 92, 54, 110), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((55, 97, 55, 115), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((56, 99, 56, 117), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((59, 18, 59, 112), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((63, 18, 65, 13), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((69, 18, 69, 113), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((73, 18, 73, 108), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((77, 18, 79, 13), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((83, 18, 83, 113), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((87, 18, 89, 13), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((93, 18, 93, 114), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((97, 18, 97, 109), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((101, 18, 101, 99), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((105, 18, 105, 117), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((109, 18, 109, 107), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((111, 80, 111, 98), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((112, 82, 112, 100), 'django.db.models.DateField', 'models.DateField', ({}, {}), '()', False, 'from django.db import models\n'), ((114, 44, 114, 115), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((118, 18, 120, 13), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n'), ((124, 18, 124, 110), 'django.db.models.Index', 'models.Index', (), '', False, 'from django.db import models\n')]