Skip to content

Commit dff410e

Browse files
authored
Merge pull request #27 from buildingSMART/feature/ivs-244_relax_constraint
IVS-244 - relax constraint + update description
2 parents d6ef6b0 + 8a205a5 commit dff410e

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

migrations/0003_version_useradditionalinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Migration(migrations.Migration):
2121
('id', models.AutoField(help_text='Identifier of the Version (auto-generated).', primary_key=True, serialize=False)),
2222
('name', models.CharField(db_index=True, help_text='Name of the Version, eg. 0.6.8', max_length=50, unique=True)),
2323
('released', models.DateTimeField(help_text='Timestamp the Version was released.')),
24-
('release_notes', models.TextField(blank=True, help_text='Description or URL of the Release Notes.', max_length=255, null=True)),
24+
('release_notes', models.TextField(blank=True, help_text='Description or URL of the Release Notes (optional).', max_length=255, null=True)),
2525
],
2626
options={
2727
'verbose_name': 'Version',
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Django 5.1.3 on 2024-11-23 18:26
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('ifc_validation_models', '0004_alter_useradditionalinfo_company_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.RemoveConstraint(
14+
model_name='modelinstance',
15+
name='modelid_stepfileid_ifctype',
16+
),
17+
migrations.AddConstraint(
18+
model_name='modelinstance',
19+
constraint=models.UniqueConstraint(fields=('model_id', 'stepfile_id'), name='modelid_stepfileid'),
20+
),
21+
]

models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ class Meta:
637637
verbose_name_plural = "Model Instances"
638638

639639
constraints = [
640-
models.UniqueConstraint(fields=['model_id', 'stepfile_id', 'ifc_type'], name='modelid_stepfileid_ifctype')
640+
models.UniqueConstraint(fields=['model_id', 'stepfile_id'], name='modelid_stepfileid')
641641
]
642642

643643
def __str__(self):

0 commit comments

Comments
 (0)