You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Unable to use UTF-8 collations with SQL Server due to using the obsolete text column type.
To Reproduce
Create a new database using a UTF-8 collation, such as Latin1_General_100_CI_AS_SC_UTF8, and run grate against this database.
Expected behavior
A successful migration happens.
Screenshots
Desktop (please complete the following information):
OS: Windows
Version: 1.8.0
Additional context
When running this through the debugger, I get this specific exception which indicates that this is due to the text type:
'Column or parameter 'text_of_script' has type 'text' and collation 'Latin1_General_100_CI_AS_SC_UTF8'.
The legacy LOB types do not support UTF-8 or UTF-16 encodings.
Use types varchar(max), nvarchar(max) or a collation which does not have the _SC or _UTF8 flags.'
In my local version I changed all of the text types to nvarchar(max) and everything functioned as expected.
There appears to have been some prior discussion here, but it appears that the column type was not updated: #250
The text was updated successfully, but these errors were encountered:
Actually, this is fixed, but in an update script, so it looks like it doesn't work if it's not possible to create a column with text type at all, when running for the first time.
We need to think about how we can ensure that the Baseline scripts can actually be run the first time too, without trying to run them twice (if we change them). Good ideas and PRs are appreciated.
We do alter the type of the columns in a migration afterwards:
Describe the bug
Unable to use UTF-8 collations with SQL Server due to using the obsolete
text
column type.To Reproduce
Create a new database using a UTF-8 collation, such as
Latin1_General_100_CI_AS_SC_UTF8
, and run grate against this database.Expected behavior
A successful migration happens.
Screenshots
Desktop (please complete the following information):
Additional context
When running this through the debugger, I get this specific exception which indicates that this is due to the
text
type:In my local version I changed all of the text types to nvarchar(max) and everything functioned as expected.
There appears to have been some prior discussion here, but it appears that the column type was not updated:
#250
The text was updated successfully, but these errors were encountered: