diff options
| author | 2018-09-23 15:21:42 +0200 | |
|---|---|---|
| committer | 2018-09-23 15:21:42 +0200 | |
| commit | 4fbbf9c2a8b30862bfaab1dddf4e860431bf6046 (patch) | |
| tree | 42fa33c0a6b22794d20a2424785803c02c4e391b /api/migrations | |
| parent | Revert "Add the `Tag` model." (diff) | |
| parent | Add API root view documentation. (diff) | |
Merge branch 'django+add-tag-api' into django
Diffstat (limited to 'api/migrations')
| -rw-r--r-- | api/migrations/0007_tag.py | 23 | ||||
| -rw-r--r-- | api/migrations/0008_tag_embed_validator.py | 20 | 
2 files changed, 43 insertions, 0 deletions
| diff --git a/api/migrations/0007_tag.py b/api/migrations/0007_tag.py new file mode 100644 index 00000000..fdb3b9cc --- /dev/null +++ b/api/migrations/0007_tag.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.1 on 2018-09-21 22:05 + +import api.models +import django.contrib.postgres.fields.jsonb +from django.db import migrations, models + + +class Migration(migrations.Migration): + +    dependencies = [ +        ('api', '0006_add_help_texts'), +    ] + +    operations = [ +        migrations.CreateModel( +            name='Tag', +            fields=[ +                ('title', models.CharField(help_text='The title of this tag, shown in searches and providing a quick overview over what this embed contains.', max_length=100, primary_key=True, serialize=False)), +                ('embed', django.contrib.postgres.fields.jsonb.JSONField(help_text='The actual embed shown by this tag.')), +            ], +            bases=(api.models.ModelReprMixin, models.Model), +        ), +    ] diff --git a/api/migrations/0008_tag_embed_validator.py b/api/migrations/0008_tag_embed_validator.py new file mode 100644 index 00000000..4c580294 --- /dev/null +++ b/api/migrations/0008_tag_embed_validator.py @@ -0,0 +1,20 @@ +# Generated by Django 2.1.1 on 2018-09-23 10:07 + +import api.validators +import django.contrib.postgres.fields.jsonb +from django.db import migrations + + +class Migration(migrations.Migration): + +    dependencies = [ +        ('api', '0007_tag'), +    ] + +    operations = [ +        migrations.AlterField( +            model_name='tag', +            name='embed', +            field=django.contrib.postgres.fields.jsonb.JSONField(help_text='The actual embed shown by this tag.', validators=[api.validators.validate_tag_embed]), +        ), +    ] | 
