mirror of
https://github.com/magnum-opus-tender-hack/backend.git
synced 2024-11-28 03:53:49 +03:00
64 lines
2.7 KiB
Python
64 lines
2.7 KiB
Python
# Generated by Django 4.0.8 on 2022-10-21 20:39
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('search', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Characteristic',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=250, unique=True, verbose_name='Имя')),
|
|
('value', models.CharField(max_length=250, verbose_name='Значение')),
|
|
],
|
|
options={
|
|
'db_table': 'Characteristic',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='UnitCharacteristic',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=250, verbose_name='Имя')),
|
|
('value', models.CharField(max_length=250, verbose_name='Значение')),
|
|
('unit', models.CharField(max_length=250, verbose_name='Размерность')),
|
|
],
|
|
options={
|
|
'db_table': 'UnitCharacteristic',
|
|
},
|
|
),
|
|
migrations.RemoveField(
|
|
model_name='product',
|
|
name='characteristic',
|
|
),
|
|
migrations.CreateModel(
|
|
name='ProductUnitCharacteristic',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('characteristic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='search.unitcharacteristic')),
|
|
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='unit_characteristics', to='search.product')),
|
|
],
|
|
options={
|
|
'db_table': 'ProductUnitCharacteristic',
|
|
},
|
|
),
|
|
migrations.CreateModel(
|
|
name='ProductCharacteristic',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('characteristic', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='search.characteristic')),
|
|
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='characteristics', to='search.product')),
|
|
],
|
|
options={
|
|
'db_table': 'ProductCharacteristic',
|
|
},
|
|
),
|
|
]
|