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

nephila / djangocms-blog / 1847
96%

Build:
DEFAULT BRANCH: develop
Ran 05 Apr 2020 10:02AM UTC
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
1847

push

travis-ci

web-flow
<a href="https://github.com/nephila/djangocms-blog/commit/<a class=hub.com/nephila/djangocms-blog/commit/39d416b4c42335f05cd7f4233785bed954557291">39d416b4c<a href="https://github.com/nephila/djangocms-blog/commit/39d416b4c42335f05cd7f4233785bed954557291">&quot;&gt;Reduce the maximum length of slug fields to 752 characters (#540)

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 </a><a class="double-link" href="https://github.com/nephila/djangocms-blog/commit/<a class="double-link" href="https://github.com/nephila/djangocms-blog/commit/747ec236868820fe662176777e15a930680ebfe0">747ec2368</a>">747ec2368</a><a href="https://github.com/nephila/djangocms-blog/commit/39d416b4c42335f05cd7f4233785bed954557291">
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, &#39;Specified key was too long; max key length is 3072 bytes&#39;)

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&#39;s necessary for
fresh installations using utf8mb4 to apply the migrations in the first place.
Jobs
ID Job ID Ran Files Coverage
7 1847.7 (TOXENV='pep8') 05 Apr 2020 10:02AM UTC 0
Travis Job 1847.7
8 1847.8 (TOXENV='isort') 05 Apr 2020 10:02AM UTC 0
Travis Job 1847.8
9 1847.9 (TOXENV='docs') 05 Apr 2020 10:03AM UTC 0
Travis Job 1847.9
Source Files on build 1847
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1847
  • 39d416b4 on github
  • Prev Build on develop (#1842)
  • Next Build on develop (#1852)
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

© 2026 Coveralls, Inc