PG doesn't allow a length for the TEXT type. you might want to go with this approach:
mytype = Text().with_variant(MEDIUMTEXT(), 'mysql') http://docs.sqlalchemy.org/en/rel_0_8/core/types.html?highlight=with_variant#sqlalchemy.types.TypeEngine.with_variant On Jan 3, 2013, at 9:58 AM, junepeach wrote: > When I updated sqlalchemy from version 0.7.9 to current one, my mediumtext > text type works in Sqlite and Mysql, but doesn't work for Postgresql DB > server anymore. I defined: > mediumtextsize = 2**24 - 1 in my data module. When I run: alembic upgrade > head, I got > > sqlalchemy.exc.ProgrammingError: (ProgrammingError) type modifier is not > allowed for type "text" > LINE 6: status TEXT(16777215), > > Not sure what is going on there, does anybody else here has some issue? > > Thanks and Happy New Year! > > LYH > > -- > 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/-/xfPxnx2TCT4J. > To post to this group, send email to sqlalchemy@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.