Нет описания

0007_auto_20210727_2312.py 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Generated by Django 3.2.5 on 2021-07-27 16:12
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  8. ('fruit', '0006_product_details'),
  9. ]
  10. operations = [
  11. migrations.AddField(
  12. model_name='product',
  13. name='n_unit',
  14. field=models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True),
  15. ),
  16. migrations.AddField(
  17. model_name='product',
  18. name='unit_name',
  19. field=models.CharField(max_length=200, null=True),
  20. ),
  21. migrations.CreateModel(
  22. name='ProductSKU',
  23. fields=[
  24. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  25. ('created_at', models.DateTimeField(auto_now_add=True, null=True)),
  26. ('updated_at', models.DateTimeField(auto_now=True)),
  27. ('sku', models.CharField(max_length=200)),
  28. ('description', models.TextField(blank=True, null=True)),
  29. ('price', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)),
  30. ('details', models.JSONField(blank=True, null=True)),
  31. ('n_unit', models.DecimalField(blank=True, decimal_places=2, max_digits=7, null=True)),
  32. ('unit_name', models.CharField(max_length=200, null=True)),
  33. ('created_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='productsku_created', to=settings.AUTH_USER_MODEL)),
  34. ('modified_by', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='productsku_modified', to=settings.AUTH_USER_MODEL)),
  35. ('product', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='fruit.product')),
  36. ],
  37. options={
  38. 'abstract': False,
  39. },
  40. ),
  41. ]