diff options
author | 2020-07-15 14:29:54 +0200 | |
---|---|---|
committer | 2020-07-15 14:29:54 +0200 | |
commit | 787b317b4617df7931c96697126b26ea7e2a217d (patch) | |
tree | bc1cab889d51b328b642d397c019ee493782c40c /pydis_site | |
parent | Set up url forwarding for the viewset. (diff) |
Add a migration for the new AllowList model.
https://github.com/python-discord/site/issues/305
Diffstat (limited to 'pydis_site')
-rw-r--r-- | pydis_site/apps/api/migrations/0057_allowlist.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/pydis_site/apps/api/migrations/0057_allowlist.py b/pydis_site/apps/api/migrations/0057_allowlist.py new file mode 100644 index 00000000..7d815e91 --- /dev/null +++ b/pydis_site/apps/api/migrations/0057_allowlist.py @@ -0,0 +1,29 @@ +# Generated by Django 3.0.8 on 2020-07-15 11:23 + +from django.db import migrations, models +import pydis_site.apps.api.models.mixins + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0056_allow_blank_user_roles'), + ] + + operations = [ + migrations.CreateModel( + name='AllowList', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('type', models.CharField(choices=[('GUILD_INVITE_ID', 'Guild Invite Id'), ('FILE_FORMAT', 'File Format'), ('DOMAIN_NAME', 'Domain Name'), ('WORD_WATCHLIST', 'Word Watchlist')], help_text='The type of allowlist this is on.', max_length=50)), + ('allowed', models.BooleanField(help_text='Whether this item is on the allowlist or the denylist.')), + ('content', models.TextField(help_text='The data to add to the allowlist.')), + ], + options={ + 'abstract': False, + }, + bases=(pydis_site.apps.api.models.mixins.ModelReprMixin, models.Model), + ), + ] |