I am trying to adapt an existing Slick-based project (not mine) to use Postgres instead of MySQL. The column is defined in Scala as an Option[Blob], which maps directly to the blob type in MySQL. Everything I found online indicated that in Postgres the appropriate equivalent is "bytea", which is easy enough to get in the database migrations, but when the program tries to do an insert, it fails with this error:
org.postgresql.util.PSQLException: ERROR: column "IMPORTS_ZIP" is of type bytea but expression is of type bigint
Hint: You will need to rewrite or cast the expression.
I found many references to this problem online, but they all appear to be related to a package called Hibernate, so it's totally unclear how to manage this in Slick. Is this technically possible, and if so what is the appropriate solution?
PS. Postgres 9.6.1, JDBC driver 42.2.5, Slick 3.2.3