0001_initial.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. # Generated by Django 3.1.1 on 2021-01-11 13:02
  2. import datetime
  3. from django.conf import settings
  4. from django.db import migrations, models
  5. import django.db.models.deletion
  6. from django.utils.timezone import utc
  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='ArticlePost',
  15. fields=[
  16. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  17. ('title', models.CharField(max_length=100)),
  18. ('body', models.TextField()),
  19. ('created', models.DateTimeField(default=datetime.datetime(2021, 1, 11, 13, 2, 9, 738792, tzinfo=utc))),
  20. ('updated', models.DateTimeField(auto_now=True)),
  21. ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  22. ],
  23. options={
  24. 'ordering': ('-created',),
  25. },
  26. ),
  27. ]