0003_menu.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Generated by Django 3.0.8 on 2020-07-28 11:55
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import mptt.fields
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  10. ('pivottable', '0002_delete_menu'),
  11. ]
  12. operations = [
  13. migrations.CreateModel(
  14. name='Menu',
  15. fields=[
  16. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  17. ('name', models.CharField(max_length=100)),
  18. ('config', models.TextField()),
  19. ('create_at', models.DateTimeField(auto_now_add=True)),
  20. ('code', models.CharField(max_length=100)),
  21. ('lft', models.PositiveIntegerField(editable=False)),
  22. ('rght', models.PositiveIntegerField(editable=False)),
  23. ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
  24. ('level', models.PositiveIntegerField(editable=False)),
  25. ('create_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  26. ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='pivottable.Menu')),
  27. ],
  28. options={
  29. 'abstract': False,
  30. },
  31. ),
  32. ]