cakephp / cakephp/phinx

SQL Server adapter still uses text and ntext types, despite deprecation

Open
#1,972 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

According to MS's documentation for SQL Server 2017, ntext and text are deprecated and pending removal. It has been official guidance to use varchar(max) and nvarchar(max) for years instead of these types.

The use of these old types also requires SQL to be written to cast or convert when comparing strings, further encouraging the need for this to be changed.

The adapter should be changed to generate varchar(max) and nvarchar(max) instead of text and ntext.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SQL Server adapter and its type mapping for text and ntext. Verify how the adapter generates schema SQL, then confirm that the generated types use varchar(max) and nvarchar(max) instead and add or update coverage if an existing adapter test is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sql
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.