{"action":"opened","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/5922","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/5922/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/5922/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/5922/events","html_url":"https://github.com/sequelize/sequelize/issues/5922","id":155618438,"number":5922,"title":"dropTable not working for simple up/down migration","user":{"login":"twler","id":819876,"avatar_url":"https://avatars.githubusercontent.com/u/819876?v=3","gravatar_id":"","url":"https://api.github.com/users/twler","html_url":"https://github.com/twler","followers_url":"https://api.github.com/users/twler/followers","following_url":"https://api.github.com/users/twler/following{/other_user}","gists_url":"https://api.github.com/users/twler/gists{/gist_id}","starred_url":"https://api.github.com/users/twler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twler/subscriptions","organizations_url":"https://api.github.com/users/twler/orgs","repos_url":"https://api.github.com/users/twler/repos","events_url":"https://api.github.com/users/twler/events{/privacy}","received_events_url":"https://api.github.com/users/twler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-18T22:44:50Z","updated_at":"2016-05-18T22:44:50Z","closed_at":null,"body":"## What you are doing?\r\nSimple migration to create or drop a table.\r\n\r\n```coffeescript\r\n    \"use strict\"\r\n    module.exports =\r\n      up: (queryInterface, Sequelize) ->\r\n        queryInterface.createTable 'MyTable',\r\n          {\r\n            id:           type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true\r\n            other_field:  type: Sequelize.STRING\r\n          }, {\r\n            engine: 'InnoDB'\r\n            charset: null\r\n          }\r\n\r\n      down: (queryInterface, Sequelize) ->\r\n        queryInterface.dropTable 'MyTable'\r\n```\r\n\r\n## What do you expect to happen?\r\nI expect it to create the table on `sequelize db:migrate --coffee` and drop the table on `sequelize db:migrate:undo --coffee`\r\n\r\n## What is actually happening?\r\nIt creates the table correctly on `sequelize db:migrate --coffee`, but throws an error on `sequelize db:migrate:undo --coffee`.  The table is actually dropped, but subsequent call to `sequelize db:migrate --coffee` to recreate the table does not work because `No migrations were executed, database schema was already up to date.`\r\n\r\n```\r\n$ sequelize db:migrate --coffee\r\n\r\nSequelize [Node: 5.8.0, CLI: 2.3.1, ORM: 2.0.0-rc4, pg: ^4.3.0]\r\n\r\nLoaded configuration file \"config/config.json\".\r\nUsing environment \"development\".\r\nUsing gulpfile /usr/local/lib/node_modules/sequelize-cli/lib/gulpfile.js\r\nStarting 'db:migrate'...\r\nFinished 'db:migrate' after 130 ms\r\n== 20160518144735-create-mytable: migrating =======\r\n== 20160518144735-create-mytable: migrated (0.121s)\r\n\r\n$ sequelize db:migrate:undo --coffee\r\n\r\nSequelize [Node: 5.8.0, CLI: 2.3.1, ORM: 2.0.0-rc4, pg: ^4.3.0]\r\n\r\nLoaded configuration file \"config/config.json\".\r\nUsing environment \"development\".\r\nUsing gulpfile /usr/local/lib/node_modules/sequelize-cli/lib/gulpfile.js\r\nStarting 'db:migrate:undo'...\r\nFinished 'db:migrate:undo' after 87 ms\r\n== 20160518144735-create-mytable: reverting =======\r\nPossibly unhandled TypeError: Cannot assign to read only property 'attribute' of tableName\r\n  at [object Object].module.exports.ModelManager.getDAO (/usr/local/lib/node_modules/sequelize/lib/model-manager.js:29:23)\r\n  at /usr/local/lib/node_modules/sequelize/lib/query-interface.js:191:57\r\n  at tryCatch1 (/usr/local/lib/node_modules/sequelize/node_modules/bluebird/js/main/util.js:45:21)\r\n  at Promise$_callHandler [as _callHandler] (/usr/local/lib/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:660:13)\r\n  at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/usr/local/lib/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:675:18)\r\n  at Promise$_settlePromiseAt (/usr/local/lib/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:845:14)\r\n  at Promise._settlePromiseAt (/usr/local/lib/node_modules/sequelize/lib/promise.js:66:18)\r\n  at Promise$_settlePromises [as _settlePromises] (/usr/local/lib/node_modules/sequelize/node_modules/bluebird/js/main/promise.js:988:14)\r\n  at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/usr/local/lib/node_modules/sequelize/node_modules/bluebird/js/main/async.js:77:12)\r\n  at Async$consumeFunctionBuffer (/usr/local/lib/node_modules/sequelize/node_modules/bluebird/js/main/async.js:40:14)\r\n  at _combinedTickCallback (node.js:370:9)\r\n  at process._tickCallback (node.js:401:11)\r\n```\r\n\r\n__Dialect:__ postgres\r\n__Database version:__ 9.4.0.1\r\n__Sequelize version:__ 2.0.0-rc4"}}