What´s the right way to create a TEXT (MYSQL) or CLOB(ORACLE/SQLSERVER) using a Migration script? I mean something like: Alter.Column("column").OnTable("table").AsXXX |
Most likely it is Astring(4001)
--
You received this message because you are subscribed to the Google Groups "FluentMigrator Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentmigrator-goog...@googlegroups.com.
To post to this group, send email to fluentmigrato...@googlegroups.com.
Visit this group at http://groups.google.com/group/fluentmigrator-google-group.
For more options, visit https://groups.google.com/groups/opt_out.
SetTypeMap(DbType.String, "NVARCHAR(255)"); // 0SetTypeMap(DbType.String, "NVARCHAR($size)", UnicodeStringCapacity); // UnicodeStringCapacity = 4000SetTypeMap(DbType.String, "NTEXT", UnicodeTextCapacity); // UnicodeTextCapacity = 1073741823...}So SQL Server 2000 will emit NTEXT as the field type for this ...Alter.Column("column").OnTable("table").AsString(4001). // > UnicodeStringCapacity and < UnicodeTextCapacityNoet: In SQL Server 2005, IMAGE, TEXT and NTEXT fields are deprecated and replaced by NVARBINARY(MAX), VARCHAR(MAX) and NVARCHAR(MAX)So these rules are overridden to generate the new typesDid you spot the bug? SQL Server 2000 will never emit an IMAGE field:SetTypeMap(DbType.Binary, "VARBINARY(8000)"); // 0SetTypeMap(DbType.Binary, "VARBINARY($size)", AnsiStringCapacity); // 8000