0001_initial.py 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. # Generated by Django 3.0.8 on 2020-07-21 06:42
  2. from django.db import migrations, models
  3. import django.db.models.deletion
  4. import mptt.fields
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. ]
  9. operations = [
  10. migrations.CreateModel(
  11. name='Genre',
  12. fields=[
  13. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  14. ('name', models.CharField(max_length=50, unique=True)),
  15. ('lft', models.PositiveIntegerField(editable=False)),
  16. ('rght', models.PositiveIntegerField(editable=False)),
  17. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  18. ('level', models.PositiveIntegerField(editable=False)),
  19. ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='mptt_test.Genre')),
  20. ],
  21. options={
  22. 'abstract': False,
  23. },
  24. ),
  25. ]