sql-source-control icon indicating copy to clipboard operation
sql-source-control copied to clipboard

Invalid type declaration for `text` columns

Open lmeyer1 opened this issue 5 years ago • 2 comments

Describe the Issue

The generated create table script has an syntax error.

Expected behavior

The generated scripts should be valid T-SQL statements.

Steps to Reproduce

  • Create a table containing a text or ntext column.
  • Pull the table schema

The generated script will contain a column definition containing text(16), e.g.

[InfoSP] text(16) COLLATE French_CI_AS NULL,

which will generate the following error when run against the database:

Msg 2716, Level 16, State 1, Line 1 Column, parameter, or variable # 8: Cannot specify a column width on data type text.

Other Information

Tables hosted on a SQL Server 2008 R2.

lmeyer1 avatar May 09 '19 14:05 lmeyer1