Blob only stores 65,535 bytes.
Medium blob stores 16,777,215 bytes
long blob stores 4 GB
As offers are expected to be larger than 15,9MB we need a bigger type.
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "alter table purchase_offer modify column file_content BLOB" via JDBC [Data truncation: Data too long for column 'file_content' at row 2]
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:94)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:574)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlStrings(AbstractSchemaMigrator.java:514)
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.migrateTable(AbstractSchemaMigrator.java:333)
Blob only stores 65,535 bytes. Medium blob stores 16,777,215 bytes long blob stores 4 GB
As offers are expected to be larger than 15,9MB we need a bigger type.