How to use BLOB datatype in alembic tool to support Postgresql?

239 views
Skip to first unread message

junepeach

unread,
Oct 30, 2012, 2:27:15 PM10/30/12
to sqlal...@googlegroups.com
We want to support as many databases as we can. Right now we have BLOB data type defined in our database schemas, both sqlite3 and mysql work fine with Alembic migration tool on that data type, however it failed on Postgresql. How should we handle that if we really want to use BLOB datatype? Thanks.

Mike Bayer

unread,
Oct 30, 2012, 2:44:40 PM10/30/12
to sqlal...@googlegroups.com
take a look at LargeBinary:

http://docs.sqlalchemy.org/en/rel_0_7/core/types.html#sqlalchemy.types.LargeBinary



On Oct 30, 2012, at 2:27 PM, junepeach wrote:

> We want to support as many databases as we can. Right now we have BLOB data type defined in our database schemas, both sqlite3 and mysql work fine with Alembic migration tool on that data type, however it failed on Postgresql. How should we handle that if we really want to use BLOB datatype? Thanks.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/5kKo3n8yXkAJ.
> To post to this group, send email to sqlal...@googlegroups.com.
> To unsubscribe from this group, send email to sqlalchemy+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
>

junepeach

unread,
Oct 31, 2012, 10:37:32 AM10/31/12
to sqlal...@googlegroups.com
Thanks. Yes it works fine now.
Reply all
Reply to author
Forward
0 new messages