{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/1020","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/1020/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/1020/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/1020/events","html_url":"https://github.com/sequelize/sequelize/issues/1020","id":21792392,"number":1020,"title":"Error with Sequelize.sync and ENUMs: enum label already exists","user":{"login":"jessefulton","id":40847,"avatar_url":"https://avatars.githubusercontent.com/u/40847?v=3","gravatar_id":"","url":"https://api.github.com/users/jessefulton","html_url":"https://github.com/jessefulton","followers_url":"https://api.github.com/users/jessefulton/followers","following_url":"https://api.github.com/users/jessefulton/following{/other_user}","gists_url":"https://api.github.com/users/jessefulton/gists{/gist_id}","starred_url":"https://api.github.com/users/jessefulton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessefulton/subscriptions","organizations_url":"https://api.github.com/users/jessefulton/orgs","repos_url":"https://api.github.com/users/jessefulton/repos","events_url":"https://api.github.com/users/jessefulton/events{/privacy}","received_events_url":"https://api.github.com/users/jessefulton/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2013-10-29T22:19:30Z","updated_at":"2015-10-28T16:10:38Z","closed_at":"2014-01-30T12:57:56Z","body":"I thought this was the same as #546, but I think it may be a new issue. When I start up my app I am receiving the following errors from Postgres using Sequelize 2.0.0 beta:\r\n\r\n    15:11:47 db.1   | ERROR:  enum label \"pending\" already exists\r\n    15:11:47 db.1   | STATEMENT:  ALTER TYPE \"enum_users_status\" ADD VALUE 'pending' BEFORE 'active'\r\n    15:11:47 db.1   | ERROR:  enum label \"active\" already exists\r\n    15:11:47 db.1   | STATEMENT:  ALTER TYPE \"enum_users_status\" ADD VALUE 'active' BEFORE 'inactive'\r\n    15:11:47 db.1   | ERROR:  enum label \"inactive\" already exists\r\n    15:11:47 db.1   | STATEMENT:  ALTER TYPE \"enum_users_status\" ADD VALUE 'inactive' AFTER 'active'\r\n\r\n\r\nThe model in question looks like\r\n\r\n```coffeescript\r\nmodule.exports = User = db.define(\"user\", {\r\n    display_name: Sequelize.STRING\r\n    avatar_url: Sequelize.STRING\r\n    role: \r\n        type: Sequelize.ENUM\r\n        values: [\"basic\", \"admin\"]\r\n        allowNull: false\r\n        defaultValue: \"basic\"\r\n        validate:\r\n            isIn: [['basic', 'admin']]\r\n    status: \r\n        type: Sequelize.ENUM\r\n        values: [\"pending\", \"active\", \"inactive\"]\r\n        allowNull: false\r\n        defaultValue: \"pending\"\r\n\r\n})\r\n```\r\n\r\nI've tried running the sync with `sequelize.sync({force: true});` and `sequelize.sync();` - both cause the error above. If I go into psql and drop the database, then recreate it, everything works fine on the next start. But then after restart it happens again and renders my application unusable... Any thoughts?"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/151895741","html_url":"https://github.com/sequelize/sequelize/issues/1020#issuecomment-151895741","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/1020","id":151895741,"user":{"login":"janmeier","id":1210224,"avatar_url":"https://avatars.githubusercontent.com/u/1210224?v=3","gravatar_id":"","url":"https://api.github.com/users/janmeier","html_url":"https://github.com/janmeier","followers_url":"https://api.github.com/users/janmeier/followers","following_url":"https://api.github.com/users/janmeier/following{/other_user}","gists_url":"https://api.github.com/users/janmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/janmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmeier/subscriptions","organizations_url":"https://api.github.com/users/janmeier/orgs","repos_url":"https://api.github.com/users/janmeier/repos","events_url":"https://api.github.com/users/janmeier/events{/privacy}","received_events_url":"https://api.github.com/users/janmeier/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T16:10:38Z","updated_at":"2015-10-28T16:10:38Z","body":"@faceleg It identifies the enum correctly though, but not the value  `enum label \"se cond\" already exists`\r\n\r\nMind opening a new issue for this?"}}