Skip to content

Commit

Permalink
Showing 3 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import jsonfield.fields


class Migration(migrations.Migration):

dependencies = [
('auditlog', '0004_logentry_detailed_object_repr'),
]

operations = [
migrations.AlterField(
model_name='logentry',
name='additional_data',
field=jsonfield.fields.JSONField(null=True, verbose_name='additional data', blank=True),
),
]
19 changes: 19 additions & 0 deletions src/auditlog/migrations/0006_object_pk_index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('auditlog', '0005_logentry_additional_data_verbose_name'),
]

operations = [
migrations.AlterField(
model_name='logentry',
name='object_pk',
field=models.TextField(verbose_name='object pk', db_index=True),
),
]
2 changes: 1 addition & 1 deletion src/auditlog/models.py
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@ class Action:
)

content_type = models.ForeignKey('contenttypes.ContentType', on_delete=models.CASCADE, related_name='+', verbose_name=_("content type"))
object_pk = models.TextField(verbose_name=_("object pk"))
object_pk = models.TextField(db_index=True, verbose_name=_("object pk"))
object_id = models.BigIntegerField(blank=True, db_index=True, null=True, verbose_name=_("object id"))
object_repr = models.TextField(verbose_name=_("object representation"))
action = models.PositiveSmallIntegerField(choices=Action.choices, verbose_name=_("action"))

0 comments on commit 266c053

Please sign in to comment.