Skip to content

Commit bb1fd3e

Browse files
authored
Merge pull request #17 from azaghal/mariadb_max_key_length_fix
Fix compatability with MySQL/MariaDB (issue #16):
2 parents 629b5b1 + 1a5ce98 commit bb1fd3e

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

regex_redirects/migrations/0002_auto_20151217_1938.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class Migration(migrations.Migration):
1919
migrations.AlterField(
2020
model_name='redirect',
2121
name='old_path',
22-
field=models.CharField(help_text="This should be an absolute path, excluding the domain name. Example: '/events/search/'.", max_length=2000, verbose_name='redirect from', db_index=True),
22+
field=models.CharField(help_text="This should be an absolute path, excluding the domain name. Example: '/events/search/'.", max_length=512, verbose_name='redirect from', db_index=True),
2323
),
2424
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- coding: utf-8 -*-
2+
from django.db import migrations, models
3+
4+
5+
class Migration(migrations.Migration):
6+
7+
dependencies = [
8+
('regex_redirects', '0004_auto_20170512_1349'),
9+
]
10+
11+
operations = [
12+
migrations.AlterField(
13+
model_name='redirect',
14+
name='old_path',
15+
field=models.CharField(db_index=True, help_text="This should be an absolute path, excluding the domain name. Example: '/events/search/'.", max_length=512, verbose_name='redirect from'),
16+
),
17+
]

regex_redirects/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class Redirect(models.Model):
88
old_path = models.CharField(_('redirect from'),
9-
max_length=2000,
9+
max_length=512,
1010
db_index=True,
1111
help_text=_("This should be an absolute path, excluding the domain name. Example: '/events/search/'."))
1212
new_path = models.CharField(_('redirect to'),

0 commit comments

Comments
 (0)