Django Library PaTT
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.

0007_historicalcomment_historicaltask.py 4.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Generated by Django 2.2.5 on 2019-10-09 19:38
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import simple_history.models
  6. class Migration(migrations.Migration):
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ('patt', '0006_auto_20191006_1824'),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='HistoricalTask',
  14. fields=[
  15. ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
  16. ('state', models.IntegerField(default=0)),
  17. ('priority', models.IntegerField(choices=[(1, '1 - Highest'), (2, '2 - High'), (3, '3 - Above-Average'), (4, '4 - Average'), (5, '5 - Below-Average'), (6, '6 - Low'), (7, '7 - Lowest')], default=4)),
  18. ('targetdate', models.DateField(blank=True, null=True)),
  19. ('progress', models.IntegerField(choices=[(0, '0 %'), (10, '10 %'), (20, '20 %'), (30, '30 %'), (40, '40 %'), (50, '50 %'), (60, '60 %'), (70, '70 %'), (80, '80 %'), (90, '90 %'), (100, '100 %')], default=0)),
  20. ('name', models.CharField(default='', max_length=150)),
  21. ('description', models.TextField(blank=True, default='')),
  22. ('creation_date', models.DateTimeField(blank=True, editable=False)),
  23. ('history_id', models.AutoField(primary_key=True, serialize=False)),
  24. ('history_date', models.DateTimeField()),
  25. ('history_change_reason', models.CharField(max_length=100, null=True)),
  26. ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
  27. ('assigned_user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
  28. ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
  29. ('project', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='patt.Project')),
  30. ],
  31. options={
  32. 'verbose_name': 'historical task',
  33. 'ordering': ('-history_date', '-history_id'),
  34. 'get_latest_by': 'history_date',
  35. },
  36. bases=(simple_history.models.HistoricalChanges, models.Model),
  37. ),
  38. migrations.CreateModel(
  39. name='HistoricalComment',
  40. fields=[
  41. ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')),
  42. ('type', models.IntegerField(choices=[(1, 'Appraisal'), (0, 'Comment')], default=0)),
  43. ('creation_date', models.DateTimeField(blank=True, editable=False)),
  44. ('comment', models.TextField()),
  45. ('history_id', models.AutoField(primary_key=True, serialize=False)),
  46. ('history_date', models.DateTimeField()),
  47. ('history_change_reason', models.CharField(max_length=100, null=True)),
  48. ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
  49. ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
  50. ('task', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='patt.Task')),
  51. ('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)),
  52. ],
  53. options={
  54. 'verbose_name': 'historical comment',
  55. 'ordering': ('-history_date', '-history_id'),
  56. 'get_latest_by': 'history_date',
  57. },
  58. bases=(simple_history.models.HistoricalChanges, models.Model),
  59. ),
  60. ]