-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
ContentFields migration error (DataMigrationManager) #4753
Comments
I will try and repro this. It maybe related to the |
@nuno-tiago-reis I can partly repro this, but only by editing the database to cause a fault with the database migration record. Theres' a couple of related issues around this #3421 and #4743 one of which is probably caused by mysql, the other not so sure. Can I ask a couple of questions?
for info, the error can be caused at line 173, in the
|
Sorry, I've been away for a few days and only saw your questions today. I'm running MySql, the only other error is listed below, regarding the Alias.
Let me know if you need anything else. |
ok, so to me it looks like the failure of one migration is causing the failure somewhere else. and the problem is MySql being limited to the length of characters that can go into an index. This covers probably the issue https://stackoverflow.com/questions/8746207/1071-specified-key-was-too-long-max-key-length-is-1000-bytes that MySql won't take an index length of the 1000 characters that the alias part now has (with utf8 encoding) I have a fix, looks like the easiest way is to not index those columns on MySql |
Could we instead detect that the index will be too long, and internally (yessql) use a constant hash (one that doesn't change from machine to machine) as the actual name? Or at least keep the first N letters and complete with a hash? The YesSql dialects would have the max length for these index names, and we could compute the length of the prefix based on that and the length of the hash (of the full string). |
Yes, we should do that for the index/prefix name length issue. This issue is different. Caused by the length of the string being indexed. Eg alias is 1000 characters. The index for MySQL won’t support 1000 characters so the dialect to create the index needs to be create index alias (250) (or whatever it is keeps it under 3096 bytes in utf8 collation for all columns in the index. We can do it in YesSql but need to add some kind of calculation to the create index dialect to figure out total bytes n split it down to 3096. Apparently with MySQL indexes should only include the start of the columns data to stay within those limits |
Hello, I've recently upgraded to OrchardCore 1.0.0-rc1-10607 (from beta 1.0.0-beta3-72452) and when initializing the following error occurs:
This doesn't seem to break anything but I thought I should report it anyway.
The text was updated successfully, but these errors were encountered: