# Generated by Django 2.2.11 on 2020-08-12 14:50

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('account', '0006_communityauth_sync'),
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.RunSQL(
            """
CREATE OR REPLACE VIEW all_user_email_addresses AS
 SELECT auth_user.username,
    auth_user.email,
    'primary'::text AS type
   FROM auth_user
UNION ALL
 SELECT auth_user.username,
    se.email,
    'secondary'::text AS type
   FROM auth_user
     JOIN account_secondaryemail se ON se.user_id = auth_user.id
            """,
            "DROP VIEW all_user_email_addresses",
        ),
    ]
