-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add migrations, add apps to settings
- Loading branch information
1 parent
bb60e76
commit 07cf848
Showing
5 changed files
with
196 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 4.2.7 on 2024-01-31 16:20 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CaseStudy', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=256)), | ||
], | ||
options={ | ||
'verbose_name': 'case study', | ||
'verbose_name_plural': 'case studies', | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Generated by Django 4.2.7 on 2024-01-31 16:20 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('person', '0001_initial'), | ||
('letter', '0001_initial'), | ||
('case_study', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='EpistolaryEvent', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=256)), | ||
('note', models.TextField(blank=True, help_text='Additional notes that describe the event and what connects the letter actions it comprises.')), | ||
('case_studies', models.ManyToManyField(help_text='case studies this event belongs to', related_name='epistolary_events', to='case_study.casestudy')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='LetterAction', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Role', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('certainty', models.IntegerField(choices=[(0, 'uncertain'), (1, 'somewhat certain'), (2, 'certain')], default=2, help_text='How certain are you of this value?')), | ||
('note', models.TextField(blank=True, help_text='Additional notes')), | ||
('present', models.BooleanField(default=True, help_text='Whether this person was physically present')), | ||
('role', models.CharField(choices=[('author', 'Author'), ('scribe', 'Scribe'), ('reader', 'Reader'), ('witness', 'Witness'), ('messenger', 'Messenger'), ('recipient', 'Recipient'), ('intended_recipient', 'Intended recipient'), ('audience', 'Audience'), ('intended_audience', 'Intended audience'), ('other', 'Other')], help_text='Role of this person in the event')), | ||
('description', models.TextField(blank=True, help_text="Longer description of this person's involvement")), | ||
('letter_action', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='event.letteraction')), | ||
('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.person')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='LetterEventDate', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('certainty', models.IntegerField(choices=[(0, 'uncertain'), (1, 'somewhat certain'), (2, 'certain')], default=2, help_text='How certain are you of this value?')), | ||
('note', models.TextField(blank=True, help_text='Additional notes')), | ||
('year_lower', models.IntegerField(default=400, help_text='The earliest possible year for the letter action', validators=[django.core.validators.MinValueValidator(400), django.core.validators.MaxValueValidator(800)])), | ||
('year_upper', models.IntegerField(default=800, help_text='The latest possible year for the letter action', validators=[django.core.validators.MinValueValidator(400), django.core.validators.MaxValueValidator(800)])), | ||
('year_exact', models.IntegerField(blank=True, help_text='The exact year of the letter action (if known)', null=True, validators=[django.core.validators.MinValueValidator(400), django.core.validators.MaxValueValidator(800)])), | ||
('letter_action', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='date', to='event.letteraction')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='LetterActionCategory', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('certainty', models.IntegerField(choices=[(0, 'uncertain'), (1, 'somewhat certain'), (2, 'certain')], default=2, help_text='How certain are you of this value?')), | ||
('note', models.TextField(blank=True, help_text='Additional notes')), | ||
('value', models.CharField(choices=[('write', 'writing'), ('transport', 'transporting'), ('deliver', 'delivering'), ('read', 'reading'), ('sign', 'signing'), ('eat', 'eating')], help_text='The type of event')), | ||
('letter_action', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='categories', to='event.letteraction')), | ||
], | ||
options={ | ||
'verbose_name_plural': 'letter action categories', | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name='letteraction', | ||
name='actors', | ||
field=models.ManyToManyField(related_name='events', through='event.Role', to='person.person'), | ||
), | ||
migrations.AddField( | ||
model_name='letteraction', | ||
name='epistolary_events', | ||
field=models.ManyToManyField(help_text='epistolary events this letter action belongs to', related_name='letter_actions', to='event.epistolaryevent'), | ||
), | ||
migrations.AddField( | ||
model_name='letteraction', | ||
name='letters', | ||
field=models.ManyToManyField(help_text='letters involved in this event', related_name='events', to='letter.letter'), | ||
), | ||
migrations.AddConstraint( | ||
model_name='letteractioncategory', | ||
constraint=models.UniqueConstraint(models.F('value'), models.F('letter_action'), name='unique_categories_for_letter_action'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 4.2.7 on 2024-01-31 16:20 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Letter', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='LetterMaterial', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('certainty', models.IntegerField(choices=[(0, 'uncertain'), (1, 'somewhat certain'), (2, 'certain')], default=2, help_text='How certain are you of this value?')), | ||
('note', models.TextField(blank=True, help_text='Additional notes')), | ||
('surface', models.CharField(choices=[('parchment', 'parchment'), ('papyrus', 'papyrus'), ('other', 'other'), ('unknown', 'unknown')])), | ||
('letter', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='letter.letter')), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 4.2.7 on 2024-01-31 16:20 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Person', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='PersonName', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('certainty', models.IntegerField(choices=[(0, 'uncertain'), (1, 'somewhat certain'), (2, 'certain')], default=2, help_text='How certain are you of this value?')), | ||
('note', models.TextField(blank=True, help_text='Additional notes')), | ||
('value', models.CharField(blank=True, max_length=256)), | ||
('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='names', to='person.person', unique=True)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
] |