[Sqlalchemy-tickets] Issue #3370: Text and length (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: Leonardo R. <iss...@bi...> - 2015-04-20 08:56:44
|
New issue 3370: Text and length https://bitbucket.org/zzzeek/sqlalchemy/issue/3370/text-and-length Leonardo Rossi: Hi, I tried to use PostgreSQL instead MySQL. I note a problem connected with Text: ```python ProgrammingError: (psycopg2.ProgrammingError) type modifier is not allowed for type "text" LINE 5: value TEXT(35) NOT NULL, ^ [SQL: "\nCREATE TABLE bib00x (\n\tid SERIAL NOT NULL, \n\ttag VARCHAR(6) DEFAULT '' NOT NULL, \n\tvalue TEXT(35) NOT NULL, \n\tPRIMARY KEY (id)\n)\n\n"] ``` And, as they wrote in [docs](http://www.postgresql.org/docs/9.1/static/datatype-character.html), Text doesn't accept length. Docs: http://docs.sqlalchemy.org/en/latest/core/type_basics.html?highlight=text#sqlalchemy.types.Text There is a possibility to specify length only for MySQL and ignore for other DB server? |