0003_auto_20200417_1830.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Generated by Django 3.0.3 on 2020-04-17 18:30
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import django.utils.timezone
  6. class Migration(migrations.Migration):
  7. dependencies = [
  8. ('projects', '0001_initial'),
  9. ('users', '0002_auto_20200225_0247'),
  10. ]
  11. operations = [
  12. migrations.AddField(
  13. model_name='user',
  14. name='created',
  15. field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
  16. preserve_default=False,
  17. ),
  18. migrations.AddField(
  19. model_name='user',
  20. name='subscribe_by_default',
  21. field=models.BooleanField(default=True, help_text='Subscribe to project notifications by default. Overrides project settings'),
  22. ),
  23. migrations.CreateModel(
  24. name='UserProjectAlerts',
  25. fields=[
  26. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  27. ('status', models.PositiveSmallIntegerField(choices=[(0, 'off'), (1, 'on')])),
  28. ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project')),
  29. ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  30. ],
  31. options={
  32. 'unique_together': {('user', 'project')},
  33. },
  34. ),
  35. ]