Skip to content

Commit

Permalink
split migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
aschn committed Dec 22, 2015
1 parent d68e973 commit b138fcb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rest_framework_tracking/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Migration(migrations.Migration):
('remote_addr', models.GenericIPAddressField()),
('host', models.URLField()),
('method', models.CharField(max_length=10)),
('query_params', models.TextField(null=True, blank=True)),
('query_params', models.TextField(db_index=True)),
('data', models.TextField(null=True, blank=True)),
('response', models.TextField(null=True, blank=True)),
('user', models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True)),
Expand Down
19 changes: 19 additions & 0 deletions rest_framework_tracking/migrations/0003_change_query_params.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 models, migrations


class Migration(migrations.Migration):

dependencies = [
("rest_framework_tracking", "0002_add_status_code"),
]

operations = [
migrations.AlterField(
'APIRequestLog',
'query_params',
models.TextField(db_index=True, null=True, blank=True),
),
]
2 changes: 1 addition & 1 deletion rest_framework_tracking/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BaseAPIRequestLog(models.Model):
method = models.CharField(max_length=10)

# query params
query_params = models.TextField(null=True, blank=True)
query_params = models.TextField(db_index=True, null=True, blank=True)

# POST body data
data = models.TextField(null=True, blank=True)
Expand Down

1 comment on commit b138fcb

@pinxli
Copy link

@pinxli pinxli commented on b138fcb Jul 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

when i try to migrate drf-tracking, i am having an error:

(1170, "BLOB/TEXT column 'query_params' used in key specification without a key length")

i am using mysql

Please sign in to comment.