Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document change of MAX_URL_LENGTH setting #139

Open
timobrembeck opened this issue Nov 24, 2022 · 1 comment
Open

Document change of MAX_URL_LENGTH setting #139

timobrembeck opened this issue Nov 24, 2022 · 1 comment

Comments

@timobrembeck
Copy link
Contributor

Changing the MAX_URL_LENGTH setting requires a database migration of the Url model.
Since this is not completely straight forward (or am I missing something?), I would add the recommended workflow for this to the README.

Similar as described in #137, I see two ways of dealing with this:

  • monkeypatching their app label to be able to add linkcheck migrations in their own directory,
  • or just running django-admin makemigrations linkcheck on the production system itself (and having to merge these individual migrations with the upstream ones in case we add more migrations)

Since both options don't seem ideal to me, I think we could also think about setting a sensible (?) but fixed value and don't allow this value to be configured?

@claudep
Copy link
Contributor

claudep commented Dec 3, 2022

I guess the basic issue is that the maximum possible length depends on the database backend, particularly with MySQL which have issues with longer lengths (https://docs.djangoproject.com/en/4.1/ref/databases/#character-fields). Same MySQL issue if we'd like to make it a TextField, due to unique=True.

As per the monkeypatching described above, there is https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-MIGRATION_MODULES.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants