Пример #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('controlled_vocabulary', '0004_remove_controlledvocabulary_test'),
        ('dublincore_resource', '0002_auto_20191211_0113'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='dublincoreresource',
            name='language',
        ),
        migrations.RemoveField(
            model_name='dublincoreresource',
            name='subject',
        ),
        migrations.AddField(
            model_name='dublincoreresource',
            name='coverage',
            field=models.CharField(blank=True, default='', help_text='The spatial or temporal topic of the resource.', max_length=200),
        ),
        migrations.AddField(
            model_name='dublincoreresource',
            name='is_part_of',
            field=models.CharField(blank=True, default='', help_text='A related resource in which the described resource is physically or logically included.', max_length=200),
        ),
        migrations.AddField(
            model_name='dublincoreresource',
            name='issued',
            field=models.CharField(blank=True, default='', help_text='Date of formal issuance (e.g., publication) of the resource.', max_length=30),
        ),
        migrations.AddField(
            model_name='dublincoreresource',
            name='languages',
            field=controlled_vocabulary.models.ControlledTermsField(blank=True, help_text='The primary language of the resource.', null=True, related_name='_dublincoreresource_languages_+', to='controlled_vocabulary.ControlledTerm', vocabularies='iso639-2'),
        ),
        migrations.AddField(
            model_name='dublincoreresource',
            name='source',
            field=models.CharField(blank=True, default='', help_text='A related resource from which the described resource is derived.', max_length=200),
        ),
        migrations.AddField(
            model_name='dublincoreresource',
            name='subjects',
            field=controlled_vocabulary.models.ControlledTermsField(blank=True, help_text='The topic of the resource.', null=True, related_name='_dublincoreresource_subjects_+', to='controlled_vocabulary.ControlledTerm', vocabularies='fast-topic'),
        ),
    ]
Пример #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('controlled_vocabulary', '0004_remove_controlledvocabulary_test'),
        ('utils', '0003_date_date_radical'),
    ]

    operations = [
        migrations.AddField(
            model_name='date',
            name='date_display_classification',
            field=controlled_vocabulary.models.ControlledTermsField(
                blank=True,
                help_text='Editorial classification of the display date.',
                related_name='_date_date_display_classification_+',
                to='controlled_vocabulary.ControlledTerm',
                vocabularies=['wikidata']),
        ),
        migrations.AddField(
            model_name='date',
            name='date_radical_classification',
            field=controlled_vocabulary.models.ControlledTermsField(
                blank=True,
                help_text='Editorial classification of the radical date.',
                related_name='_date_date_radical_classification_+',
                to='controlled_vocabulary.ControlledTerm',
                vocabularies=['wikidata']),
        ),
        migrations.AlterField(
            model_name='date',
            name='date_radical',
            field=models.CharField(blank=True,
                                   help_text='Alternative calendar date.',
                                   max_length=255,
                                   null=True),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('controlled_vocabulary', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DublinCoreAgent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('full_name', models.CharField(max_length=200)),
                ('identifier',
                 models.URLField(blank=True, default='', max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='DublinCoreRights',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('shorthand',
                 models.CharField(blank=True, default='', max_length=50)),
                ('statement', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='DublinCoreResource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('identifier',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text=
                     'A code or URL that uniquely identifies the resource within a referencial system. It should be compact, widely recognised and as stable as possible (i.e. it will never change in the future). e.g. ISBN:1-56592-149-6',
                     max_length=200)),
                ('title',
                 models.CharField(help_text='A name given to the resource.',
                                  max_length=300)),
                ('date',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text=
                     "The point or period in time the resource was created or made available. Not necessarily the same as 'temporal' column (see below).",
                     max_length=30)),
                ('bibliographic_citation',
                 models.TextField(
                     blank=True,
                     default='',
                     help_text='A bibliographic reference for the resource.')),
                ('description',
                 models.TextField(
                     blank=True,
                     default='',
                     help_text=
                     'An account of the resource (e.g. abstract, summary). One or more sentences.'
                 )),
                ('temporal',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text=
                     'The date or period in history the resource refers to.',
                     max_length=200)),
                ('attachment',
                 models.FileField(
                     blank=True,
                     default='',
                     upload_to=dublincore_resource.models.get_upload_path)),
                ('contributors',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'A person or organization not specified in a Creator element who has made significant intellectual contributions to the resource but whose contribution is secondary to any person or organization specified in a Creator element',
                     related_name='contributed_resources',
                     to='dublincore_resource.DublinCoreAgent')),
                ('creators',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The person or organization primarily responsible for creating the intellectual content of the resource.',
                     related_name='created_resources',
                     to='dublincore_resource.DublinCoreAgent')),
                ('format',
                 controlled_vocabulary.models.ControlledTermField(
                     blank=True,
                     help_text=
                     'The physical or digital manifestation of the resource.',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies='mime')),
                ('language',
                 controlled_vocabulary.models.ControlledTermField(
                     blank=True,
                     help_text='The primary language of the resource.',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies='iso639-2')),
                ('publisher',
                 models.ForeignKey(
                     blank=True,
                     help_text=
                     'An entity responsible for making the resource available.',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='published_resources',
                     to='dublincore_resource.DublinCoreAgent')),
                ('rights',
                 models.ForeignKey(
                     blank=True,
                     help_text=
                     'A rights management statement, an identifier that links to a rights management statement, or an identifier that links to a service providing information about rights management for the resource.',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='resources',
                     to='dublincore_resource.DublinCoreRights')),
                ('spatial',
                 controlled_vocabulary.models.ControlledTermField(
                     blank=True,
                     help_text=
                     "The location or geographic scope of the resource's content.",
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies='wikidata')),
                ('subject',
                 controlled_vocabulary.models.ControlledTermField(
                     blank=True,
                     help_text='The topic of the resource.',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies='fast-topic')),
                ('type',
                 controlled_vocabulary.models.ControlledTermField(
                     blank=True,
                     help_text='The nature or genre of the resource.',
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies='dcmitype')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Пример #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('geonames_place', '0004_change_meta_options_on_country'),
        ('utils', '0001_initial'),
        ('controlled_vocabulary', '0004_remove_controlledvocabulary_test'),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Agent',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('name',
                 models.CharField(help_text='The agent name.',
                                  max_length=128)),
                ('based_near',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'A location that something is based near, for some broadly human notion of near.',
                     to='geonames_place.Place')),
                ('page',
                 controlled_vocabulary.models.ControlledTermsField(
                     blank=True,
                     help_text='A page or document about this Agent.',
                     related_name='_agent_page_+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies=['viaf'])),
                ('polymorphic_ctype',
                 models.ForeignKey(
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='polymorphic_agents.agent_set+',
                     to='contenttypes.ContentType')),
                ('roles',
                 controlled_vocabulary.models.ControlledTermsField(
                     blank=True,
                     help_text='Roles performed by this Agent.',
                     related_name='_agent_roles_+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies=['wikidata'])),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('agent_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='agents.Agent')),
                ('given_name',
                 models.CharField(blank=True,
                                  help_text='The given name of some person.',
                                  max_length=64,
                                  null=True)),
                ('family_name',
                 models.CharField(blank=True,
                                  help_text='The family name of some person.',
                                  max_length=64,
                                  null=True)),
                ('gender',
                 models.CharField(blank=True,
                                  choices=[('f', 'female'), ('m', 'male'),
                                           ('u', 'unknown')],
                                  help_text='The gender of this Person.',
                                  max_length=1,
                                  null=True)),
                ('date_birth',
                 models.OneToOneField(
                     blank=True,
                     help_text='The date of birth of this Person.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='person_birth',
                     to='utils.Date')),
                ('date_death',
                 models.OneToOneField(
                     blank=True,
                     help_text='The date of death of this Person.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='person_death',
                     to='utils.Date')),
                ('knows',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'A person known by this person (indicating some level of reciprocated interaction between the parties).',
                     related_name='_person_knows_+',
                     to='agents.Person')),
                ('languages',
                 controlled_vocabulary.models.ControlledTermsField(
                     blank=True,
                     help_text=
                     'The languages this person spoke or worked with.',
                     related_name='_person_languages_+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies=['iso639-2'])),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('agents.agent', ),
        ),
        migrations.CreateModel(
            name='Organisation',
            fields=[
                ('agent_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='agents.Agent')),
                ('members',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Members of this organisation',
                     related_name='member_of',
                     to='agents.Agent')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('agents.agent', ),
        ),
    ]
Пример #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('controlled_vocabulary', '0004_remove_controlledvocabulary_test'),
        ('utils', '0001_initial'),
        ('agents', '0001_initial'),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Resource',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('notes',
                 models.TextField(
                     blank=True,
                     help_text=
                     'Information, usually in textual form, on attributes of a resource or some aspect of a resource.',
                     null=True)),
                ('languages',
                 controlled_vocabulary.models.ControlledTermsField(
                     blank=True,
                     help_text=
                     'Language associated with a resource or its parts.',
                     related_name='_resource_languages_+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies=['iso639-2'])),
                ('polymorphic_ctype',
                 models.ForeignKey(
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='polymorphic_core.resource_set+',
                     to='contenttypes.ContentType')),
                ('subjects',
                 controlled_vocabulary.models.ControlledTermsField(
                     blank=True,
                     help_text='Subject term(s) describing a resource',
                     related_name='_resource_subjects_+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies=['fast-topic'])),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
        ),
        migrations.CreateModel(
            name='Title',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('main_title',
                 models.CharField(
                     help_text=
                     'Title being addressed. Possible title component.',
                     max_length=256)),
                ('subtitle',
                 models.CharField(
                     blank=True,
                     help_text=
                     'Word, character, or group of words and/or characters that contains the remainder of the title after the main title. Possible title component.',
                     max_length=256,
                     null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Instance',
            fields=[
                ('resource_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.Resource')),
                ('edition_enumeration',
                 models.CharField(
                     blank=True,
                     help_text=
                     'Enumeration of the edition; usually transcribed.',
                     max_length=128,
                     null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('core.resource', ),
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('resource_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.Resource')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('core.resource', ),
        ),
        migrations.CreateModel(
            name='ResourceRelationship',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('related_to',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Resource')),
                ('relationship_type',
                 controlled_vocabulary.models.ControlledTermField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies=['bf-crr'])),
                ('resource',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='relationships',
                                   to='core.Resource')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='resource',
            name='title',
            field=models.ForeignKey(
                help_text=
                'Title information relating to a resource: work title, preferred title, instance title, transcribed title, translated title, variant form of title, etc.',
                on_delete=django.db.models.deletion.CASCADE,
                to='core.Title'),
        ),
        migrations.AddField(
            model_name='resource',
            name='title_variant',
            field=models.ForeignKey(
                blank=True,
                help_text=
                'Title associated with the resource that is different from the Work or Instance title (titles in another language and/or script etc.).',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='variants',
                to='core.Title'),
        ),
        migrations.CreateModel(
            name='Contribution',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('agent',
                 models.ForeignKey(
                     help_text=
                     'Entity associated with a resource or element of description, such as the name of the entity responsible for the content or of the publication, printing, distribution, issue, release or production of a resource.',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='agents.Agent')),
                ('resource',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='contributions',
                                   to='core.Resource')),
                ('roles',
                 controlled_vocabulary.models.ControlledTermsField(
                     blank=True,
                     help_text=
                     'Function provided by a contributor, e.g., author, illustrator, etc.',
                     related_name='_contribution_roles_+',
                     to='controlled_vocabulary.ControlledTerm',
                     vocabularies=['wikidata'])),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Classification',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 model_utils.fields.AutoCreatedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='created')),
                ('modified',
                 model_utils.fields.AutoLastModifiedField(
                     default=django.utils.timezone.now,
                     editable=False,
                     verbose_name='modified')),
                ('edition',
                 models.CharField(
                     help_text=
                     'Edition of the classification scheme, such as full, abridged or a number, when a classification scheme designates editions.',
                     max_length=64)),
                ('resource',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='classifications',
                                   to='core.Resource')),
                ('source',
                 models.ForeignKey(
                     blank=True,
                     help_text=
                     'Resource from which value or label came or was derived.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='sources',
                     to='core.Resource')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Work',
            fields=[
                ('resource_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='core.Resource')),
                ('origin_date',
                 models.OneToOneField(
                     blank=True,
                     help_text=
                     'Date or date range associated with the creation of a Work.',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='utils.Date')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('core.resource', ),
        ),
    ]