You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import models, migrations
  4. from django.conf import settings
  5. import uuid
  6. class Migration(migrations.Migration):
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ("api", "0009_auto_20150801_1250"),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name="Channel",
  14. fields=[
  15. (
  16. "id",
  17. models.AutoField(
  18. primary_key=True,
  19. auto_created=True,
  20. verbose_name="ID",
  21. serialize=False,
  22. ),
  23. ),
  24. ("code", models.UUIDField(editable=False, default=uuid.uuid4)),
  25. ("created", models.DateTimeField(auto_now_add=True)),
  26. (
  27. "kind",
  28. models.CharField(
  29. choices=[
  30. ("email", "Email"),
  31. ("webhook", "Webhook"),
  32. ("pd", "PagerDuty"),
  33. ],
  34. max_length=20,
  35. ),
  36. ),
  37. ("value", models.CharField(max_length=200, blank=True)),
  38. ("email_verified", models.BooleanField(default=False)),
  39. ("checks", models.ManyToManyField(to="api.Check")),
  40. (
  41. "user",
  42. models.ForeignKey(
  43. to=settings.AUTH_USER_MODEL, on_delete=models.CASCADE
  44. ),
  45. ),
  46. ],
  47. )
  48. ]