45 lines
1.8 KiB
Python
45 lines
1.8 KiB
Python
|
# Generated by Django 3.2.5 on 2022-01-10 18:12
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import uuid
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
dependencies = [
|
||
|
('parts', '0010_auto_20220103_1606'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.AddField(
|
||
|
model_name='componenttype',
|
||
|
name='key_parameter1',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='type_param1', to='parts.componentparametertype'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='componenttype',
|
||
|
name='key_parameter2',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='type_param2', to='parts.componentparametertype'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='componenttype',
|
||
|
name='key_parameter3',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='type_param3', to='parts.componentparametertype'),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='PackageParameter',
|
||
|
fields=[
|
||
|
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||
|
('value', models.FloatField(default=0)),
|
||
|
('text_value', models.TextField(blank=True)),
|
||
|
('package', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='parts.package')),
|
||
|
('parameter_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='parts.componentparametertype')),
|
||
|
],
|
||
|
options={
|
||
|
'ordering': ['id'],
|
||
|
'unique_together': {('package', 'parameter_type')},
|
||
|
},
|
||
|
),
|
||
|
]
|