Skip to content

Commit

Permalink
Merge pull request #27 from buildingSMART/feature/ivs-244_relax_const…
Browse files Browse the repository at this point in the history
…raint

IVS-244 - relax constraint + update description
  • Loading branch information
rw-bsi authored Nov 24, 2024
2 parents d6ef6b0 + 8a205a5 commit dff410e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion migrations/0003_version_useradditionalinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(help_text='Identifier of the Version (auto-generated).', primary_key=True, serialize=False)),
('name', models.CharField(db_index=True, help_text='Name of the Version, eg. 0.6.8', max_length=50, unique=True)),
('released', models.DateTimeField(help_text='Timestamp the Version was released.')),
('release_notes', models.TextField(blank=True, help_text='Description or URL of the Release Notes.', max_length=255, null=True)),
('release_notes', models.TextField(blank=True, help_text='Description or URL of the Release Notes (optional).', max_length=255, null=True)),
],
options={
'verbose_name': 'Version',
Expand Down
21 changes: 21 additions & 0 deletions migrations/0005_update_modelinstance_constraint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 5.1.3 on 2024-11-23 18:26

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('ifc_validation_models', '0004_alter_useradditionalinfo_company_and_more'),
]

operations = [
migrations.RemoveConstraint(
model_name='modelinstance',
name='modelid_stepfileid_ifctype',
),
migrations.AddConstraint(
model_name='modelinstance',
constraint=models.UniqueConstraint(fields=('model_id', 'stepfile_id'), name='modelid_stepfileid'),
),
]
2 changes: 1 addition & 1 deletion models.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ class Meta:
verbose_name_plural = "Model Instances"

constraints = [
models.UniqueConstraint(fields=['model_id', 'stepfile_id', 'ifc_type'], name='modelid_stepfileid_ifctype')
models.UniqueConstraint(fields=['model_id', 'stepfile_id'], name='modelid_stepfileid')
]

def __str__(self):
Expand Down

0 comments on commit dff410e

Please sign in to comment.