mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +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
|
||||
|
||||
for ticket in Ticket.objects.using(db_alias).all():
|
||||
ticket.secret_key=''
|
||||
ticket.save()
|
||||
ticket.secret_key = ''
|
||||
ticket.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('helpdesk', '0018_fix_migrations'),
|
||||
('helpdesk', '0018_ticket_secret_key'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='ticket',
|
||||
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),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user