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

Key length limitation in Mysql #449

Closed
x4base opened this issue May 9, 2016 · 4 comments · Fixed by #459
Closed

Key length limitation in Mysql #449

x4base opened this issue May 9, 2016 · 4 comments · Fixed by #459

Comments

@x4base
Copy link
Contributor

x4base commented May 9, 2016

When using utf8_general_ci collation in mysql, "Specified key was too long; max key length is 767 bytes" occurs.
According to this post: http://stackoverflow.com/a/16820166, I modified all sa.String(length=256) to length=255 and it worked.
How can we solve this problem? Should I just modify the migrations script, or create a new migration script? If I modify the old scripts, those who is already using mysql will have inconsistent column length; if I create a new script, the problem still happens because the old migration scripts will be run first.

@mistercrunch
Copy link
Member

You need to alter models.py and then generate a new migration script caravel db migrate -m "adjusting key length".

@x4base
Copy link
Contributor Author

x4base commented May 10, 2016

But older scripts will be run first, right? So for the clean install, the initiation will stop before the new script I create is run.

@x4base
Copy link
Contributor Author

x4base commented May 10, 2016

What kind of database do you use in production? Have you tried mysql? I think there are some compatibility issues - like SQLite has auto increment in primary keys by default but mysql does not.

@mistercrunch
Copy link
Member

We use MySQL in production and it works well for us.

zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.10 to 2.0.11.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@2.0.10...2.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.10 to 2.0.11.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@2.0.10...2.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.10 to 2.0.11.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@2.0.10...2.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 2.0.10 to 2.0.11.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@2.0.10...2.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

2 participants