Skip to content

Commit

Permalink
Merge pull request #99 from RockefellerArchiveCenter/issue-84
Browse files Browse the repository at this point in the history
Adds "origin" field to bag
  • Loading branch information
bonniegee authored Jan 28, 2020
2 parents 25840d5 + 124a53d commit af60676
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bagdiscovery/migrations/0004_bag_origin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.8 on 2020-01-27 18:27

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('bagdiscovery', '0003_auto_20200127_1819'),
]

operations = [
migrations.AddField(
model_name='bag',
name='origin',
field=models.CharField(choices=[('aurora', 'Aurora'), ('legacy_digital', 'Legacy Digital Processing'), ('digitization', 'Digitization')], default='aurora', max_length=20),
),
]
6 changes: 6 additions & 0 deletions bagdiscovery/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ class Bag(models.Model):
bag_identifier = models.CharField(max_length=255, unique=True)
bag_path = models.CharField(max_length=255, null=True, blank=True)
accession = models.ForeignKey(Accession, on_delete=models.CASCADE, null=True, blank=True)
ORIGIN_CHOICES = (
('aurora', 'Aurora'),
('legacy_digital', 'Legacy Digital Processing'),
('digitization', 'Digitization')
)
origin = models.CharField(max_length=20, choices=ORIGIN_CHOICES, default='aurora')
data = JSONField(null=True, blank=True)
created = models.DateTimeField(auto_now=True)
last_modified = models.DateTimeField(auto_now_add=True)

0 comments on commit af60676

Please sign in to comment.