{"action":"created","issue":{"url":"https://api.github.com/repos/inveniosoftware/invenio/issues/3037","labels_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/3037/labels{/name}","comments_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/3037/comments","events_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/3037/events","html_url":"https://github.com/inveniosoftware/invenio/issues/3037","id":69544616,"number":3037,"title":"sqlalchemy: PostgreSQL - type Text compatibility","user":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/inveniosoftware/invenio/labels/t_bug","name":"t_bug","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inveniosoftware/invenio/milestones/13","html_url":"https://github.com/inveniosoftware/invenio/milestones/v2.1","labels_url":"https://api.github.com/repos/inveniosoftware/invenio/milestones/13/labels","id":857114,"number":13,"title":"v2.1","description":"","creator":{"login":"tiborsimko","id":517546,"avatar_url":"https://avatars.githubusercontent.com/u/517546?v=3","gravatar_id":"","url":"https://api.github.com/users/tiborsimko","html_url":"https://github.com/tiborsimko","followers_url":"https://api.github.com/users/tiborsimko/followers","following_url":"https://api.github.com/users/tiborsimko/following{/other_user}","gists_url":"https://api.github.com/users/tiborsimko/gists{/gist_id}","starred_url":"https://api.github.com/users/tiborsimko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiborsimko/subscriptions","organizations_url":"https://api.github.com/users/tiborsimko/orgs","repos_url":"https://api.github.com/users/tiborsimko/repos","events_url":"https://api.github.com/users/tiborsimko/events{/privacy}","received_events_url":"https://api.github.com/users/tiborsimko/received_events","type":"User","site_admin":false},"open_issues":59,"closed_issues":87,"state":"open","created_at":"2014-11-07T09:21:23Z","updated_at":"2015-04-20T09:57:37Z","due_on":"2015-04-30T22:00:00Z","closed_at":null},"comments":1,"created_at":"2015-04-20T09:21:20Z","updated_at":"2015-04-21T08:36:15Z","closed_at":null,"body":"PostgreSQL Text type doesn't accept length parameter: http://www.postgresql.org/docs/9.1/static/datatype-character.html\r\n\r\n```python\r\nProgrammingError: (psycopg2.ProgrammingError) type modifier is not allowed for type \"text\"\r\nLINE 5:  value TEXT(35) NOT NULL,\r\n                ^\r\n[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\"]\r\n```\r\n\r\nI tried to ask to zzzeek if exists a easy solution to this problem: https://bitbucket.org/zzzeek/sqlalchemy/issue/3370/text-and-length\r\n\r\nIn alternative, with @jirikuncar, we agree to resolve in the same way as for [Integer](https://github.com/inveniosoftware/invenio/blob/master/invenio/ext/sqlalchemy/types/legacyinteger.py#L26)"},"comment":{"url":"https://api.github.com/repos/inveniosoftware/invenio/issues/comments/94702703","html_url":"https://github.com/inveniosoftware/invenio/issues/3037#issuecomment-94702703","issue_url":"https://api.github.com/repos/inveniosoftware/invenio/issues/3037","id":94702703,"user":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T08:36:15Z","updated_at":"2015-04-21T08:36:15Z","body":"I found that also Integer give us problems if we use latest version of SQLAlchemy 1.0.0.\r\nzzzeek told me about a solution (maybe applicable also to solve integer problem).\r\n\r\nSo, summarizing all problems:\r\n\r\n - [ ] Integer problem: `Integer takes no parameters`\r\n - [ ] Text don't take length ([see for the solution](https://bitbucket.org/zzzeek/sqlalchemy/issue/3370/text-and-length))"}}