conwetlab/ckanext-datarequests

database initialization not working with CKAN 2.3 and postgresql 9.1.x

mostrovoi opened this issue · 3 comments

HI, We' ve tried to use this module but database generation failed since postgresql apparently does not support max length for field definition. I get the following exception:

Error - <class 'sqlalchemy.exc.ProgrammingError'>: (ProgrammingError) type modifier is not allowed for type "text"

Removing max length constraint from db.py and plugin.py did the job for me:

https://github.com/conwetlab/ckanext-datarequests/blob/master/ckanext/datarequests/db.py#L68

Related ticket:
https://bitbucket.org/zzzeek/sqlalchemy/issue/3370/text-and-length

You're completly right. That's a bug I didn't notice. I've created the patch to fix it. Sorry for the inconveniences and thank you for reporting. :)

BTW: I think that this bug appeared with CKAN 2.3, since the version of SQLAlchemy used in CKAN 2.2 handles this error.

thank you! now it is working for us as well :)

Glad to hear that! :)