-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update SQLServerPlatform default clob type from varchar to nvarchar #6138
Conversation
Can you elaborate your motivation behind this change? Why is the new column type better than the old one? What happens if I created a database with the current release of DBAL and ran a schema diff after your change has been merged? Can we cover this migration path with a test? Also, since you've filed this as a bug: Why do you believe the current behavior is wrong? Why does this change quality as a bugfix? |
👍 for this PR - it is basically #4987 reasoning/repro is in #4987 (comment) - should be added as a functional |
Understood. Still, the question about the upgrade path remains. Also, the tests are failing on SQL server. |
Thanks @mvorisek, I hadn't actually seen #4987 in my initial search. Seems the validity of this PR isn't being questioned, but as with your previous PR, the biggest question is the upgrade path. If we leave this PR as-is, the schema diff will show all existing text/json/array/object columns as being the wrong type, and any migrations would attempt to update all existing columns at once. Personally, this would be welcomed in my cases, but I can see that potentially being an issue for other people. @derrabus Truth is, I don't have any suggestions for how to mitigate this. Has anything similar happened previously that could be used as precedent? Also, as a side note: I will attempt to fix some of the failing tests now that I know about the functional tests. I wasn't even aware of their existence when developing this PR. |
I’m not very familiar with MSSQL, but it seems that using UTF-8 support seems to be there since SQL Server 2019. @thsmrtone1 Other than old SQL Server versions, are there any reasons you would prefer To me it seems that UTF-8 might be a better fit for the PHP ecosystem. |
I belive |
There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
This pull request was closed due to inactivity. |
Summary
This PR updates SQLServerPlatform default clob type from varchar to nvarchar. This will ensure text/json/array/object columns use nvarchar(max) instead of varchar(max)
Previous PR was closed due to original author deleting their fork. New PR includes updates to unit tests to account for change.