• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nephila / djangocms-blog / 1846
96%

Build:
DEFAULT BRANCH: develop
Ran 04 Apr 2020 08:22PM CUT
Jobs 3
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1846

Pull #540

travis-ci

web-flow
Reduce the maximum length of slug fields to 752 characters

Recent versions of mysql (tested with 8.0.19) limit the size of key length to
3072 bytes, effectively limiting the size of varchar indices to 767 characters
when using utf8mb4 encoding. Commit 747ec2368
sets the minimum length of slug fields to 767 characters to address the
issue. However, when slug fields appear in composite indices, the limit of 767
characters applies to the _composite_ index and not just the slug part. This
limits the maximum length even further.

With freshly installed database running migrations leads to this:

$ python manage.py migrate
  Apply all migrations: ...
Running migrations:
  ...
  Applying djangocms_blog.0032_auto_20180109_0023...Traceback (most recent call last):
  ...
  django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 3072 bytes')

This is due to slug field in `Post` and `BlogCategory` models appearing in
composite index with `language_code`. `language_code` has type varchar(15),
effectively limiting the maximum lenght of `slug` to 752 characters (752+15=767)
to ensure successful migrations.

This commit reduces maximum length of slug fields to 752 characters. It was done
to existing migrations. While this may cause inconsistencies for old
installations that have already applied those migrations, it's necessary for
fresh installations using utf8mb4 to apply the migrations in the first place.
Pull Request #540: Reduce max length of slug fields to 752 characters
Jobs
ID Job ID Ran Files Coverage
7 1846.7 (TOXENV='pep8') 04 Apr 2020 08:22PM CUT 0
Travis Job 1846.7
8 1846.8 (TOXENV='isort') 04 Apr 2020 08:22PM CUT 0
Travis Job 1846.8
9 1846.9 (TOXENV='docs') 04 Apr 2020 08:23PM CUT 0
Travis Job 1846.9
Source Files on build 1846
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/Line
No data available in table
Showing 0 to 0 of 0 entries
  • Previous
  • Next
  • Back to Repo
  • Travis Build #1846
  • Pull Request #540
  • PR Base - develop (#1842)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc