mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
fix(migrations): Rename the migration back due to InconsistentMigrationHistory otherwise
This commit is contained in:
parent
6dd3b07dad
commit
e9a2313d93
@ -8,20 +8,22 @@ def clear_secret_keys(apps, schema_editor):
|
|||||||
db_alias = schema_editor.connection.alias
|
db_alias = schema_editor.connection.alias
|
||||||
|
|
||||||
for ticket in Ticket.objects.using(db_alias).all():
|
for ticket in Ticket.objects.using(db_alias).all():
|
||||||
ticket.secret_key=''
|
ticket.secret_key = ''
|
||||||
ticket.save()
|
ticket.save()
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('helpdesk', '0018_fix_migrations'),
|
('helpdesk', '0018_ticket_secret_key'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='ticket',
|
model_name='ticket',
|
||||||
name='secret_key',
|
name='secret_key',
|
||||||
field=models.CharField(default=helpdesk.models.mk_secret, max_length=36, verbose_name='Secret key needed for viewing/editing ticket by non-logged in users'),
|
field=models.CharField(default=helpdesk.models.mk_secret, max_length=36,
|
||||||
|
verbose_name='Secret key needed for viewing/editing ticket by non-logged in users'),
|
||||||
),
|
),
|
||||||
migrations.RunPython(clear_secret_keys),
|
migrations.RunPython(clear_secret_keys),
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user