Applied Black
This commit is contained in:
@@ -7,24 +7,25 @@ import jsonfield.fields
|
||||
|
||||
def modify_json(apps, schema_editor):
|
||||
from django.conf import settings
|
||||
|
||||
if "mysql" in settings.DATABASES.get("default", {}).get("engine", ""):
|
||||
migrations.RunSQL("alter table mfa_user_keys modify column properties json;")
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('mfa', '0004_user_keys_enabled'),
|
||||
("mfa", "0004_user_keys_enabled"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='user_keys',
|
||||
name='secret_key',
|
||||
model_name="user_keys",
|
||||
name="secret_key",
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='user_keys',
|
||||
name='properties',
|
||||
model_name="user_keys",
|
||||
name="properties",
|
||||
field=jsonfield.fields.JSONField(null=True),
|
||||
),
|
||||
migrations.RunPython(modify_json)
|
||||
migrations.RunPython(modify_json),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user