diff options
author | 2020-07-16 20:48:56 +0200 | |
---|---|---|
committer | 2020-07-16 20:48:56 +0200 | |
commit | 76cd687715e49cee97bac24f5d3c8ca40ffca099 (patch) | |
tree | 604996943856e6253d2514194a29bb4d620967fd /pydis_site/apps/api/migrations | |
parent | Fix some broken tests. (diff) |
Rename AllowList to AllowDenyList.
https://github.com/python-discord/site/issues/305
Diffstat (limited to 'pydis_site/apps/api/migrations')
-rw-r--r-- | pydis_site/apps/api/migrations/0057_create_new_allowdenylist_model.py (renamed from pydis_site/apps/api/migrations/0057_create_new_allowlist_model.py) | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/pydis_site/apps/api/migrations/0057_create_new_allowlist_model.py b/pydis_site/apps/api/migrations/0057_create_new_allowdenylist_model.py index 45650d86..c450344b 100644 --- a/pydis_site/apps/api/migrations/0057_create_new_allowlist_model.py +++ b/pydis_site/apps/api/migrations/0057_create_new_allowdenylist_model.py @@ -5,33 +5,28 @@ import pydis_site.apps.api.models.mixins class Migration(migrations.Migration): - dependencies = [ ('api', '0056_allow_blank_user_roles'), ] operations = [ migrations.CreateModel( - name='AllowList', + name='AllowDenyList', 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)), + ('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.')), + ('content', models.TextField(help_text='The data to add to the allow or denylist.')), ], - options={ - 'abstract': False, - }, bases=(pydis_site.apps.api.models.mixins.ModelReprMixin, models.Model), ), - migrations.AlterModelTable( - name='allowlist', - table='allow_list', - ), migrations.AddConstraint( - model_name='allowlist', - constraint=models.UniqueConstraint(fields=('content', 'type'), name='unique_allowlist'), + model_name='allowdenylist', + constraint=models.UniqueConstraint(fields=('content', 'type'), name='unique_allow_deny_list'), ) ] |