sql-source-control
sql-source-control copied to clipboard
Invalid type declaration for `text` columns
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
orntext
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.