From d5203377cd3b92fc8427453c6e401968c59ba5db Mon Sep 17 00:00:00 2001 From: Dylan Hillerbrand Date: Wed, 2 Oct 2024 13:03:32 -0400 Subject: [PATCH] chore: add migrations for previous commits Refs: 14e0f56d19cb4ebfb8afde755a0aa6cddfa86a4a, 960fcf07fc9efe0e2e039575becec6dd962d2b81, a83337032161d7b139118f359482002fdb9909fb --- ...ter_source_holding_institution_and_more.py | 32 ------ ..._name_source_production_method_and_more.py | 104 ++++++++++++++++++ ...0032_source_name_alter_source_shelfmark.py | 28 ----- .../migrations/0033_sourceidentifier.py | 53 --------- 4 files changed, 104 insertions(+), 113 deletions(-) delete mode 100644 django/cantusdb_project/main_app/migrations/0031_alter_source_holding_institution_and_more.py create mode 100644 django/cantusdb_project/main_app/migrations/0031_source_name_source_production_method_and_more.py delete mode 100644 django/cantusdb_project/main_app/migrations/0032_source_name_alter_source_shelfmark.py delete mode 100644 django/cantusdb_project/main_app/migrations/0033_sourceidentifier.py diff --git a/django/cantusdb_project/main_app/migrations/0031_alter_source_holding_institution_and_more.py b/django/cantusdb_project/main_app/migrations/0031_alter_source_holding_institution_and_more.py deleted file mode 100644 index e793e3991..000000000 --- a/django/cantusdb_project/main_app/migrations/0031_alter_source_holding_institution_and_more.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 4.2.14 on 2024-08-30 13:58 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ("main_app", "0030_institution_is_private_collection"), - ] - - operations = [ - migrations.AlterField( - model_name="source", - name="holding_institution", - field=models.ForeignKey( - default=19, - on_delete=django.db.models.deletion.PROTECT, - to="main_app.institution", - ), - preserve_default=False, - ), - migrations.AlterField( - model_name="source", - name="shelfmark", - field=models.CharField( - default="XX-NN", - max_length=255, - ), - ), - ] diff --git a/django/cantusdb_project/main_app/migrations/0031_source_name_source_production_method_and_more.py b/django/cantusdb_project/main_app/migrations/0031_source_name_source_production_method_and_more.py new file mode 100644 index 000000000..b0440b7f8 --- /dev/null +++ b/django/cantusdb_project/main_app/migrations/0031_source_name_source_production_method_and_more.py @@ -0,0 +1,104 @@ +# Generated by Django 4.2.14 on 2024-10-02 17:01 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ("main_app", "0030_institution_is_private_collection"), + ] + + operations = [ + migrations.AddField( + model_name="source", + name="name", + field=models.CharField( + blank=True, + help_text="A colloquial or commonly-used name for the source", + max_length=255, + null=True, + ), + ), + migrations.AddField( + model_name="source", + name="production_method", + field=models.IntegerField( + choices=[(1, "Manuscript"), (2, "Printed")], + default=1, + verbose_name="Manuscript/Printed", + ), + ), + migrations.AddField( + model_name="source", + name="source_completeness", + field=models.IntegerField( + choices=[ + (1, "Full source"), + (2, "Fragment/Fragmented"), + (3, "Reconstruction"), + ], + default=1, + verbose_name="Full Source/Fragment", + ), + ), + migrations.AlterField( + model_name="institution", + name="country", + field=models.CharField(default="[No Country]", max_length=64), + ), + migrations.AlterField( + model_name="institution", + name="name", + field=models.CharField(default="[No Name]", max_length=255), + ), + migrations.AlterField( + model_name="source", + name="shelfmark", + field=models.CharField( + default="[No Shelfmark]", + help_text="Primary Cantus Database identifier for the source (e.g. library shelfmark, DACT ID, etc.)", + max_length=255, + ), + ), + migrations.CreateModel( + name="SourceIdentifier", + fields=[ + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("identifier", models.CharField(max_length=255)), + ( + "type", + models.IntegerField( + choices=[ + (1, "Other catalogues"), + (2, "olim (Former shelfmark)"), + (3, "Alternative names"), + (4, "RISM Online"), + ] + ), + ), + ("note", models.TextField(blank=True, null=True)), + ( + "source", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="identifiers", + to="main_app.source", + ), + ), + ], + options={ + "verbose_name": "Source Identifier", + "ordering": ("type",), + }, + ), + ] diff --git a/django/cantusdb_project/main_app/migrations/0032_source_name_alter_source_shelfmark.py b/django/cantusdb_project/main_app/migrations/0032_source_name_alter_source_shelfmark.py deleted file mode 100644 index 12a3e2327..000000000 --- a/django/cantusdb_project/main_app/migrations/0032_source_name_alter_source_shelfmark.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 4.2.14 on 2024-09-13 14:19 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("main_app", "0031_alter_source_holding_institution_and_more"), - ] - - operations = [ - migrations.AddField( - model_name="source", - name="name", - field=models.CharField( - blank=True, - help_text="A colloquial or commonly-used name for the source", - max_length=255, - null=True, - ), - ), - migrations.AlterField( - model_name="source", - name="shelfmark", - field=models.CharField(max_length=255), - ), - ] diff --git a/django/cantusdb_project/main_app/migrations/0033_sourceidentifier.py b/django/cantusdb_project/main_app/migrations/0033_sourceidentifier.py deleted file mode 100644 index d17e23cb0..000000000 --- a/django/cantusdb_project/main_app/migrations/0033_sourceidentifier.py +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by Django 4.2.14 on 2024-09-13 14:34 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ("main_app", "0032_source_name_alter_source_shelfmark"), - ] - - operations = [ - migrations.CreateModel( - name="SourceIdentifier", - fields=[ - ( - "id", - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ("identifier", models.CharField(max_length=255)), - ( - "type", - models.IntegerField( - choices=[ - (1, "Other catalogues"), - (2, "olim (Former shelfmark)"), - (3, "Alternative names"), - (4, "RISM Online"), - ] - ), - ), - ("note", models.TextField(blank=True, null=True)), - ( - "source", - models.ForeignKey( - on_delete=django.db.models.deletion.CASCADE, - related_name="identifiers", - to="main_app.source", - ), - ), - ], - options={ - "verbose_name": "Source Identifier", - "ordering": ("type",), - }, - ), - ]