0002_auto_20200128_0945.py 2.28 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
# -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-01-28 09:45
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import djangoldp.fields


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='SharingCriteria',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('urlid', djangoldp.fields.LDPUrlField(blank=True, null=True, unique=True)),
                ('name', models.CharField(max_length=128, verbose_name='name')),
                ('value', models.CharField(blank=True, max_length=128, null=True, verbose_name='value')),
            ],
            options={
                'abstract': False,
                'default_permissions': ('add', 'change', 'delete', 'view', 'control'),
            },
        ),
        migrations.CreateModel(
            name='Target',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('urlid', djangoldp.fields.LDPUrlField(blank=True, null=True, unique=True)),
                ('name', models.CharField(max_length=128, verbose_name='name')),
                ('value', models.CharField(blank=True, max_length=128, null=True, verbose_name='value')),
            ],
            options={
                'abstract': False,
                'default_permissions': ('add', 'change', 'delete', 'view', 'control'),
            },
        ),
        migrations.RemoveField(
            model_name='request',
            name='target',
        ),
        migrations.AlterField(
            model_name='resource',
            name='sharing',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='coopstarter_data.SharingCriteria', verbose_name='Sharing profile'),
        ),
        migrations.AlterField(
            model_name='resource',
            name='target',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='coopstarter_data.Target', verbose_name='Target audience'),
        ),
    ]