-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Increase size of the language column in language_stat #12396
Increase size of the language column in language_stat #12396
Conversation
ed1cfd4
to
a8d1265
Compare
So actually thinking on, because sqlite doesn't need to change schema - varchar is mapped to text - I think we might be able to get away with just using ALTER TABLE in this case. I'll keep this code though and add a doctor command that will allow you to recreate tables from the schema - that will finally allow us to be able to get rid of the weird warning messages about defaults having changed. |
7bb96a0
to
f6a4452
Compare
In go-gitea#12379 it was discovered that enry v2 has a maximum language length of 34 characters which is larger than the 30 previously provided. This PR updates the language column to 50. Fix go-gitea#12379 Signed-off-by: Andrew Thornton <art27@cantab.net>
f6a4452
to
437ab15
Compare
Signed-off-by: Andrew Thornton <art27@cantab.net>
Finally I think I've solved (again) all the issues with the different dialects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if this code could be moved to function like rename column but otherwise looks good
@lafriks unfortunately a general solution is not very easy at all. In particular SQLite poses a particular problem here. SQLite doesn't have a mechanism for changing the type of a column and you can't create a column with a unique not null constraint on an already existing table. So you're limited to copying the table and adding the column. In reality the simplest thing to do is to recreate the table in its entirety from bean definition - I've provided that as another PR. A general method that keeps the previous columns would be possible but I suspect that it may not be worth it. |
Otherwise LGTM |
make lg-tm work |
Hmm it seems this migration is giving me some trouble against MariaDB:
|
In #12379 it was discovered that enry v2 has a maximum language length
of 34 characters which is larger than the 30 previously provided.
This PR updates the language column to 50.
Fix #12379
Fix #13013
Signed-off-by: Andrew Thornton art27@cantab.net