Define String Column Length in SDK

ignition80
database
sdk
#1

I’ve got a module that automatically creates a table in SQL and I would like to make a column that would be equivalent to a LONGTEXT in MySQL. What is the best way to define that?

I’m following the guide below.
[https://docs.inductiveautomation.com/display/SE/Working+with+Platform+Services]

0 Likes

#2

Use DataType.Text, rather than DataType.String when adding the column to DBTableSchema, and the default translator should automatically coerce to whatever the translator defines a ‘long text’ column as (nvarchar(max), text(), etc)

0 Likes

#3

Thanks Paul - I’m not sure how I missed that…

1 Like