aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-08-22 21:20:24 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2019-08-22 21:20:24 +0200
commit4c6c1f9cefe5f6989181716fbf92e7ce8150d013 (patch)
tree14d1fa07bd5e1e2a7de29d143d02325a1c792825 /pydis_site
parentRemoving default value for 'position' field of Role model (diff)
First adding default value, then removing it to make it required.
Diffstat (limited to 'pydis_site')
-rw-r--r--pydis_site/apps/api/migrations/0039_add_position_field_to_role.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pydis_site/apps/api/migrations/0039_add_position_field_to_role.py b/pydis_site/apps/api/migrations/0039_add_position_field_to_role.py
index 2aa51f80..b6b27ff2 100644
--- a/pydis_site/apps/api/migrations/0039_add_position_field_to_role.py
+++ b/pydis_site/apps/api/migrations/0039_add_position_field_to_role.py
@@ -13,6 +13,11 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='role',
name='position',
- field=models.IntegerField(help_text='The position of the role in the role hierarchy of the Discord Guild.'),
+ field=models.IntegerField(default=-1, help_text='The position of the role in the role hierarchy of the Discord Guild.'),
),
+ migrations.AlterField(
+ model_name='role',
+ name='position',
+ field=models.IntegerField(help_text='The position of the role in the role hierarchy of the Discord Guild.'),
+ )
]