{"action":"opened","number":5444,"pull_request":{"url":"https://api.github.com/repos/sequelize/sequelize/pulls/5444","id":59719972,"html_url":"https://github.com/sequelize/sequelize/pull/5444","diff_url":"https://github.com/sequelize/sequelize/pull/5444.diff","patch_url":"https://github.com/sequelize/sequelize/pull/5444.patch","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/5444","number":5444,"state":"open","locked":false,"title":"Multiple custom unique validation messages being overwritten by the first-defined message","user":{"login":"connor4312","id":2230985,"avatar_url":"https://avatars.githubusercontent.com/u/2230985?v=3","gravatar_id":"","url":"https://api.github.com/users/connor4312","html_url":"https://github.com/connor4312","followers_url":"https://api.github.com/users/connor4312/followers","following_url":"https://api.github.com/users/connor4312/following{/other_user}","gists_url":"https://api.github.com/users/connor4312/gists{/gist_id}","starred_url":"https://api.github.com/users/connor4312/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connor4312/subscriptions","organizations_url":"https://api.github.com/users/connor4312/orgs","repos_url":"https://api.github.com/users/connor4312/repos","events_url":"https://api.github.com/users/connor4312/events{/privacy}","received_events_url":"https://api.github.com/users/connor4312/received_events","type":"User","site_admin":false},"body":"This issue was not in the dialect as https://github.com/sequelize/sequelize/issues/4920 hints, but rather in the model definition. Sequelized looks/ed for unique index names when the `unique` property is given as an object, even if it only contains a `msg`. This resulted in, when many columns contained an object like `unique: { msg: '...' }`, it grouping them under the `undefined` key and subsequently ignoring further message definitions.\r\n\r\nThis PR modifies the building so that the name is pulled out only if defined in the unique property.","created_at":"2016-02-17T22:31:00Z","updated_at":"2016-02-17T22:31:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sequelize/sequelize/pulls/5444/commits","review_comments_url":"https://api.github.com/repos/sequelize/sequelize/pulls/5444/comments","review_comment_url":"https://api.github.com/repos/sequelize/sequelize/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5444/comments","statuses_url":"https://api.github.com/repos/sequelize/sequelize/statuses/47dc46a7f4b00e06687c0bdea9a53a5cc2ba18fd","head":{"label":"WatchBeam:master","ref":"master","sha":"47dc46a7f4b00e06687c0bdea9a53a5cc2ba18fd","user":{"login":"WatchBeam","id":11798804,"avatar_url":"https://avatars.githubusercontent.com/u/11798804?v=3","gravatar_id":"","url":"https://api.github.com/users/WatchBeam","html_url":"https://github.com/WatchBeam","followers_url":"https://api.github.com/users/WatchBeam/followers","following_url":"https://api.github.com/users/WatchBeam/following{/other_user}","gists_url":"https://api.github.com/users/WatchBeam/gists{/gist_id}","starred_url":"https://api.github.com/users/WatchBeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WatchBeam/subscriptions","organizations_url":"https://api.github.com/users/WatchBeam/orgs","repos_url":"https://api.github.com/users/WatchBeam/repos","events_url":"https://api.github.com/users/WatchBeam/events{/privacy}","received_events_url":"https://api.github.com/users/WatchBeam/received_events","type":"Organization","site_admin":false},"repo":{"id":51959946,"name":"sequelize","full_name":"WatchBeam/sequelize","owner":{"login":"WatchBeam","id":11798804,"avatar_url":"https://avatars.githubusercontent.com/u/11798804?v=3","gravatar_id":"","url":"https://api.github.com/users/WatchBeam","html_url":"https://github.com/WatchBeam","followers_url":"https://api.github.com/users/WatchBeam/followers","following_url":"https://api.github.com/users/WatchBeam/following{/other_user}","gists_url":"https://api.github.com/users/WatchBeam/gists{/gist_id}","starred_url":"https://api.github.com/users/WatchBeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WatchBeam/subscriptions","organizations_url":"https://api.github.com/users/WatchBeam/orgs","repos_url":"https://api.github.com/users/WatchBeam/repos","events_url":"https://api.github.com/users/WatchBeam/events{/privacy}","received_events_url":"https://api.github.com/users/WatchBeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WatchBeam/sequelize","description":"Sequelize is an easy-to-use multi sql dialect ORM for Node.js & io.js. It currently supports MySQL, MariaDB, SQLite, PostgreSQL and MSSQL.","fork":true,"url":"https://api.github.com/repos/WatchBeam/sequelize","forks_url":"https://api.github.com/repos/WatchBeam/sequelize/forks","keys_url":"https://api.github.com/repos/WatchBeam/sequelize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WatchBeam/sequelize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WatchBeam/sequelize/teams","hooks_url":"https://api.github.com/repos/WatchBeam/sequelize/hooks","issue_events_url":"https://api.github.com/repos/WatchBeam/sequelize/issues/events{/number}","events_url":"https://api.github.com/repos/WatchBeam/sequelize/events","assignees_url":"https://api.github.com/repos/WatchBeam/sequelize/assignees{/user}","branches_url":"https://api.github.com/repos/WatchBeam/sequelize/branches{/branch}","tags_url":"https://api.github.com/repos/WatchBeam/sequelize/tags","blobs_url":"https://api.github.com/repos/WatchBeam/sequelize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WatchBeam/sequelize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WatchBeam/sequelize/git/refs{/sha}","trees_url":"https://api.github.com/repos/WatchBeam/sequelize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WatchBeam/sequelize/statuses/{sha}","languages_url":"https://api.github.com/repos/WatchBeam/sequelize/languages","stargazers_url":"https://api.github.com/repos/WatchBeam/sequelize/stargazers","contributors_url":"https://api.github.com/repos/WatchBeam/sequelize/contributors","subscribers_url":"https://api.github.com/repos/WatchBeam/sequelize/subscribers","subscription_url":"https://api.github.com/repos/WatchBeam/sequelize/subscription","commits_url":"https://api.github.com/repos/WatchBeam/sequelize/commits{/sha}","git_commits_url":"https://api.github.com/repos/WatchBeam/sequelize/git/commits{/sha}","comments_url":"https://api.github.com/repos/WatchBeam/sequelize/comments{/number}","issue_comment_url":"https://api.github.com/repos/WatchBeam/sequelize/issues/comments{/number}","contents_url":"https://api.github.com/repos/WatchBeam/sequelize/contents/{+path}","compare_url":"https://api.github.com/repos/WatchBeam/sequelize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WatchBeam/sequelize/merges","archive_url":"https://api.github.com/repos/WatchBeam/sequelize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WatchBeam/sequelize/downloads","issues_url":"https://api.github.com/repos/WatchBeam/sequelize/issues{/number}","pulls_url":"https://api.github.com/repos/WatchBeam/sequelize/pulls{/number}","milestones_url":"https://api.github.com/repos/WatchBeam/sequelize/milestones{/number}","notifications_url":"https://api.github.com/repos/WatchBeam/sequelize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WatchBeam/sequelize/labels{/name}","releases_url":"https://api.github.com/repos/WatchBeam/sequelize/releases{/id}","deployments_url":"https://api.github.com/repos/WatchBeam/sequelize/deployments","created_at":"2016-02-17T22:25:45Z","updated_at":"2016-02-17T22:25:48Z","pushed_at":"2016-02-17T22:28:00Z","git_url":"git://github.com/WatchBeam/sequelize.git","ssh_url":"git@github.com:WatchBeam/sequelize.git","clone_url":"https://github.com/WatchBeam/sequelize.git","svn_url":"https://github.com/WatchBeam/sequelize","homepage":"http://sequelizejs.com","size":17195,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sequelize:master","ref":"master","sha":"aaa8f942e2c5dd8088e1395e9f938b751ba5f0a0","user":{"login":"sequelize","id":3591786,"avatar_url":"https://avatars.githubusercontent.com/u/3591786?v=3","gravatar_id":"","url":"https://api.github.com/users/sequelize","html_url":"https://github.com/sequelize","followers_url":"https://api.github.com/users/sequelize/followers","following_url":"https://api.github.com/users/sequelize/following{/other_user}","gists_url":"https://api.github.com/users/sequelize/gists{/gist_id}","starred_url":"https://api.github.com/users/sequelize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequelize/subscriptions","organizations_url":"https://api.github.com/users/sequelize/orgs","repos_url":"https://api.github.com/users/sequelize/repos","events_url":"https://api.github.com/users/sequelize/events{/privacy}","received_events_url":"https://api.github.com/users/sequelize/received_events","type":"Organization","site_admin":false},"repo":{"id":790359,"name":"sequelize","full_name":"sequelize/sequelize","owner":{"login":"sequelize","id":3591786,"avatar_url":"https://avatars.githubusercontent.com/u/3591786?v=3","gravatar_id":"","url":"https://api.github.com/users/sequelize","html_url":"https://github.com/sequelize","followers_url":"https://api.github.com/users/sequelize/followers","following_url":"https://api.github.com/users/sequelize/following{/other_user}","gists_url":"https://api.github.com/users/sequelize/gists{/gist_id}","starred_url":"https://api.github.com/users/sequelize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequelize/subscriptions","organizations_url":"https://api.github.com/users/sequelize/orgs","repos_url":"https://api.github.com/users/sequelize/repos","events_url":"https://api.github.com/users/sequelize/events{/privacy}","received_events_url":"https://api.github.com/users/sequelize/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sequelize/sequelize","description":"Sequelize is an easy-to-use multi sql dialect ORM for Node.js & io.js. It currently supports MySQL, MariaDB, SQLite, PostgreSQL and MSSQL.","fork":false,"url":"https://api.github.com/repos/sequelize/sequelize","forks_url":"https://api.github.com/repos/sequelize/sequelize/forks","keys_url":"https://api.github.com/repos/sequelize/sequelize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sequelize/sequelize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sequelize/sequelize/teams","hooks_url":"https://api.github.com/repos/sequelize/sequelize/hooks","issue_events_url":"https://api.github.com/repos/sequelize/sequelize/issues/events{/number}","events_url":"https://api.github.com/repos/sequelize/sequelize/events","assignees_url":"https://api.github.com/repos/sequelize/sequelize/assignees{/user}","branches_url":"https://api.github.com/repos/sequelize/sequelize/branches{/branch}","tags_url":"https://api.github.com/repos/sequelize/sequelize/tags","blobs_url":"https://api.github.com/repos/sequelize/sequelize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sequelize/sequelize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sequelize/sequelize/git/refs{/sha}","trees_url":"https://api.github.com/repos/sequelize/sequelize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sequelize/sequelize/statuses/{sha}","languages_url":"https://api.github.com/repos/sequelize/sequelize/languages","stargazers_url":"https://api.github.com/repos/sequelize/sequelize/stargazers","contributors_url":"https://api.github.com/repos/sequelize/sequelize/contributors","subscribers_url":"https://api.github.com/repos/sequelize/sequelize/subscribers","subscription_url":"https://api.github.com/repos/sequelize/sequelize/subscription","commits_url":"https://api.github.com/repos/sequelize/sequelize/commits{/sha}","git_commits_url":"https://api.github.com/repos/sequelize/sequelize/git/commits{/sha}","comments_url":"https://api.github.com/repos/sequelize/sequelize/comments{/number}","issue_comment_url":"https://api.github.com/repos/sequelize/sequelize/issues/comments{/number}","contents_url":"https://api.github.com/repos/sequelize/sequelize/contents/{+path}","compare_url":"https://api.github.com/repos/sequelize/sequelize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sequelize/sequelize/merges","archive_url":"https://api.github.com/repos/sequelize/sequelize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sequelize/sequelize/downloads","issues_url":"https://api.github.com/repos/sequelize/sequelize/issues{/number}","pulls_url":"https://api.github.com/repos/sequelize/sequelize/pulls{/number}","milestones_url":"https://api.github.com/repos/sequelize/sequelize/milestones{/number}","notifications_url":"https://api.github.com/repos/sequelize/sequelize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sequelize/sequelize/labels{/name}","releases_url":"https://api.github.com/repos/sequelize/sequelize/releases{/id}","deployments_url":"https://api.github.com/repos/sequelize/sequelize/deployments","created_at":"2010-07-22T07:11:11Z","updated_at":"2016-02-17T21:32:38Z","pushed_at":"2016-02-17T21:20:09Z","git_url":"git://github.com/sequelize/sequelize.git","ssh_url":"git@github.com:sequelize/sequelize.git","clone_url":"https://github.com/sequelize/sequelize.git","svn_url":"https://github.com/sequelize/sequelize","homepage":"http://sequelizejs.com","size":53746,"stargazers_count":5767,"watchers_count":5767,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1235,"mirror_url":null,"open_issues_count":674,"forks":1235,"open_issues":674,"watchers":5767,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/5444"},"html":{"href":"https://github.com/sequelize/sequelize/pull/5444"},"issue":{"href":"https://api.github.com/repos/sequelize/sequelize/issues/5444"},"comments":{"href":"https://api.github.com/repos/sequelize/sequelize/issues/5444/comments"},"review_comments":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/5444/comments"},"review_comment":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sequelize/sequelize/pulls/5444/commits"},"statuses":{"href":"https://api.github.com/repos/sequelize/sequelize/statuses/47dc46a7f4b00e06687c0bdea9a53a5cc2ba18fd"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":56,"deletions":18,"changed_files":4}}