# Generated by Django 3.1.7 on 2021-03-16 16:11

import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("django_sql_dashboard", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="dashboard",
            name="created_at",
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
        migrations.AddField(
            model_name="dashboard",
            name="edit_group",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="can_edit_dashboards",
                to="auth.group",
            ),
        ),
        migrations.AddField(
            model_name="dashboard",
            name="edit_policy",
            field=models.CharField(
                choices=[
                    ("private", "Private"),
                    ("loggedin", "Logged-in users"),
                    ("group", "Users in group"),
                    ("staff", "Staff users"),
                    ("superuser", "Superusers"),
                ],
                default="private",
                max_length=10,
            ),
        ),
        migrations.AddField(
            model_name="dashboard",
            name="owned_by",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="owned_dashboards",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AddField(
            model_name="dashboard",
            name="view_group",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="can_view_dashboards",
                to="auth.group",
            ),
        ),
        migrations.AddField(
            model_name="dashboard",
            name="view_policy",
            field=models.CharField(
                choices=[
                    ("private", "Private"),
                    ("public", "Public"),
                    ("unlisted", "Unlisted"),
                    ("loggedin", "Logged-in users"),
                    ("group", "Users in group"),
                    ("staff", "Staff users"),
                    ("superuser", "Superusers"),
                ],
                default="private",
                max_length=10,
            ),
        ),
    ]
