{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/4009","repository_url":"https://api.github.com/repos/balderdashy/sails","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/4009/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/4009/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/4009/events","html_url":"https://github.com/balderdashy/sails/issues/4009","id":211232253,"number":4009,"title":"error: function lower(enum_users_status) does not exist","user":{"login":"sgress454","id":553428,"avatar_url":"https://avatars1.githubusercontent.com/u/553428?v=3","gravatar_id":"","url":"https://api.github.com/users/sgress454","html_url":"https://github.com/sgress454","followers_url":"https://api.github.com/users/sgress454/followers","following_url":"https://api.github.com/users/sgress454/following{/other_user}","gists_url":"https://api.github.com/users/sgress454/gists{/gist_id}","starred_url":"https://api.github.com/users/sgress454/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgress454/subscriptions","organizations_url":"https://api.github.com/users/sgress454/orgs","repos_url":"https://api.github.com/users/sgress454/repos","events_url":"https://api.github.com/users/sgress454/events{/privacy}","received_events_url":"https://api.github.com/users/sgress454/received_events","type":"User","site_admin":false},"labels":[{"id":196935897,"url":"https://api.github.com/repos/balderdashy/sails/labels/bug","name":"bug","color":"b11420","default":true},{"id":551031115,"url":"https://api.github.com/repos/balderdashy/sails/labels/patched%20on%20master","name":"patched on master","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-03-01T22:43:17Z","updated_at":"2017-03-01T22:43:25Z","closed_at":null,"body":"_From @slavafomin on August 8, 2016 22:36_\n\nHello!\n\nThank you for this great library!\n\nHowever, I'm having an error: `function lower(enum_users_status) does not exist`.\n\nI'm not sure if this issue relates to this module or to waterline.\n\nHere's my other comment (left unnoticed):\nhttps://github.com/balderdashy/sails-postgresql/issues/99#issuecomment-236730862\n\n---\n\nThe `enum_users_status` is a custom enumeration type used in our PostgreSQL database. The schema for it is:\n\n``` pgsql\nCREATE TYPE \"enum_users_status\" AS ENUM (\n  'foo',\n  'bar',\n  'baz'\n);\n```\n\nSuch database type should be easily mapped to `string` or `text` type.\n\nIt's defined in my model as:\n\n```\n    status: {\n      type: 'string',\n      size: 20,\n      enum: ['foo', 'bar', 'baz'],\n      defaultsTo: 'foo',\n      required: true\n    }\n```\n\nWhat is the reason for this error? Such configuration works perfectly fine with Sequelize in our other project.\n\n```\n$ npm ls waterline\napp\n├─┬ sails@0.12.3\n│ └── waterline@0.11.2 \n└─┬ sails-hook-validation@0.4.6\n  └── waterline@0.10.31\n```\n\nPlease advise, thank you!\n\n\n_Copied from original issue: balderdashy/sails-postgresql#256_"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/283495659","html_url":"https://github.com/balderdashy/sails/issues/4009#issuecomment-283495659","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/4009","id":283495659,"user":{"login":"sgress454","id":553428,"avatar_url":"https://avatars1.githubusercontent.com/u/553428?v=3","gravatar_id":"","url":"https://api.github.com/users/sgress454","html_url":"https://github.com/sgress454","followers_url":"https://api.github.com/users/sgress454/followers","following_url":"https://api.github.com/users/sgress454/following{/other_user}","gists_url":"https://api.github.com/users/sgress454/gists{/gist_id}","starred_url":"https://api.github.com/users/sgress454/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgress454/subscriptions","organizations_url":"https://api.github.com/users/sgress454/orgs","repos_url":"https://api.github.com/users/sgress454/repos","events_url":"https://api.github.com/users/sgress454/events{/privacy}","received_events_url":"https://api.github.com/users/sgress454/received_events","type":"User","site_admin":false},"created_at":"2017-03-01T22:43:25Z","updated_at":"2017-03-01T22:43:25Z","body":"_From @particlebanana on November 7, 2016 18:15_\n\n@slavafomin I'm moving the adapters away from the in house built sql generator to just use Knex. The version on Master should work in this use case - it also removes all the `lower` stuff.\n\nIt will be published as `sails-postgresql@1.0.0` when the next version of Waterline is published.\n\nI added the \"bug\" label to this so the bot will leave it alone.\n"}}
{"actor":{"display_login":"sgress454"}}