0001_initial.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.11 on 2018-03-28 19:06
  3. from __future__ import unicode_literals
  4. from django.conf import settings
  5. from django.db import migrations, models
  6. import django.db.models.deletion
  7. class Migration(migrations.Migration):
  8. initial = True
  9. dependencies = [
  10. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  11. ]
  12. operations = [
  13. migrations.CreateModel(
  14. name='Request',
  15. fields=[
  16. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  17. ('name', models.CharField(max_length=35)),
  18. ('create_at', models.DateTimeField(auto_now_add=True)),
  19. ('update_at', models.DateTimeField(auto_now=True)),
  20. ('status', models.PositiveSmallIntegerField(choices=[(1, 'Abierto'), (2, 'Rechazado'), (3, 'Procesando'), (4, 'Hecho'), (5, 'Error')], default=1)),
  21. ('issue', models.CharField(blank=True, max_length=100)),
  22. ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  23. ],
  24. options={
  25. 'abstract': False,
  26. },
  27. ),
  28. migrations.CreateModel(
  29. name='Task',
  30. fields=[
  31. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  32. ('name', models.CharField(max_length=35)),
  33. ('create_at', models.DateTimeField(auto_now_add=True)),
  34. ('update_at', models.DateTimeField(auto_now=True)),
  35. ('last_execution', models.DateTimeField()),
  36. ('request', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Request')),
  37. ],
  38. options={
  39. 'abstract': False,
  40. },
  41. ),
  42. ]