This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, In the designer, I have an entity with field of type blob. I set the Validate Length to 200MB as I figured that it may be consistent as with string fields where the Validate Length property also influence the size of the string in the database. The requirement is to store up to 100MB in the field. I generated a migration which generated the following for the field new Field("Contents", ModelDataType.Blob, false),
When I try to upload a document of around 90KB, I get a MySQL error that the field is too small. It turns out that LightSpeed creates a BLOB field. So I changed the migration such that the field looked like this
new Field("Contents", ModelDataType.Blob, false).WithSize(209715200), I recreated the database and ran the migration again. The column in MySQL was still a BLOB field (I was expecting a LONGBLOB at this time). Is there a way to get the migrations to generate a LONGBLOB and honor the sizes? Thanks, Werner
|
|
|
Hmm, we don't currently consider size when mapping Blob fields to database types. I'll take a look at adding this. However, for now you can use the "native database type" overload of the Field constructor: new Field("Contents", "LONGBLOB", false) |
|
|
Thanks Ivan, that will work in the meantime. Thanks, Werner
|
|