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

SQL Server adapter uses nvarchar(max) instead of ntext and always updates default constraint #1977

Open
wants to merge 5 commits into
base: 0.x
Choose a base branch
from

Conversation

atbigelow
Copy link

The first commit of this PR handles #1972, which is to remove the use of NTEXT and replace it with NVARCHAR(MAX). The existing NTEXT and TEXT parsing to the Phinx TEXT type still exists for compatibility reasons.

The second commit forces default constraints to always be dropped and readded, as SQL Server requires this to be removed if the column is ever changed.

August Trapper Bigelow added 2 commits April 28, 2021 16:18
ALTER TABLE COLUMN calls error out unless the constraint is properly removed prior. This removes the logic of determining if the default changes, as the database doesn't care if it does or not.
TEXT types have been deprecated for years and VARCHAR(MAX) has been the recommended type to use. This changes the translation to use nvarchar(max) instead. Also ensures that there isn't a limit set when retrieving text columns, to keep this abstracted away.
No need for an else with an early return.
@dereuromark
Copy link
Member

Any update? Or shall we close this?

@atbigelow
Copy link
Author

Went ahead and updated these. Sorry on the delay.

@dereuromark
Copy link
Member

Do we want to continue and merge?
@MasterOdin

@dereuromark
Copy link
Member

Ping @MasterOdin

@dereuromark
Copy link
Member

I wonder if we might need a test case here to back things up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants