Skip to content

Commit

Permalink
Merge pull request #17 from azaghal/mariadb_max_key_length_fix
Browse files Browse the repository at this point in the history
Fix compatability with MySQL/MariaDB (issue #16):
  • Loading branch information
alextreme authored Apr 27, 2021
2 parents 629b5b1 + 1a5ce98 commit bb1fd3e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion regex_redirects/migrations/0002_auto_20151217_1938.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='redirect',
name='old_path',
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),
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),
),
]
17 changes: 17 additions & 0 deletions regex_redirects/migrations/0005_auto_20210425_1321.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('regex_redirects', '0004_auto_20170512_1349'),
]

operations = [
migrations.AlterField(
model_name='redirect',
name='old_path',
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'),
),
]
2 changes: 1 addition & 1 deletion regex_redirects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class Redirect(models.Model):
old_path = models.CharField(_('redirect from'),
max_length=2000,
max_length=512,
db_index=True,
help_text=_("This should be an absolute path, excluding the domain name. Example: '/events/search/'."))
new_path = models.CharField(_('redirect to'),
Expand Down

0 comments on commit bb1fd3e

Please sign in to comment.