{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/cli/issues/133","repository_url":"https://api.github.com/repos/sequelize/cli","labels_url":"https://api.github.com/repos/sequelize/cli/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/cli/issues/133/comments","events_url":"https://api.github.com/repos/sequelize/cli/issues/133/events","html_url":"https://github.com/sequelize/cli/issues/133","id":74883707,"node_id":"MDU6SXNzdWU3NDg4MzcwNw==","number":133,"title":"Migrations - Add Multiple Columns Example?","user":{"login":"countrdd","id":3502770,"node_id":"MDQ6VXNlcjM1MDI3NzA=","avatar_url":"https://avatars1.githubusercontent.com/u/3502770?v=4","gravatar_id":"","url":"https://api.github.com/users/countrdd","html_url":"https://github.com/countrdd","followers_url":"https://api.github.com/users/countrdd/followers","following_url":"https://api.github.com/users/countrdd/following{/other_user}","gists_url":"https://api.github.com/users/countrdd/gists{/gist_id}","starred_url":"https://api.github.com/users/countrdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/countrdd/subscriptions","organizations_url":"https://api.github.com/users/countrdd/orgs","repos_url":"https://api.github.com/users/countrdd/repos","events_url":"https://api.github.com/users/countrdd/events{/privacy}","received_events_url":"https://api.github.com/users/countrdd/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":50,"created_at":"2015-05-10T10:02:07Z","updated_at":"2018-11-26T12:14:02Z","closed_at":"2017-09-21T16:45:57Z","author_association":"NONE","body":"I am somewhat of a newbie, and I have a single add column working, but a couple of questions.\n\nhow can I add multiple columns in one migration file...\nalso, when I rerun my app I am seeing   ER_DUP_FIELDNAME: Duplicate column name 'test' when I run the node server.js the next time...which is correct because it has already been created, should I worry abot catching and ignore the error or just let it run as it is?\n\nAlso, if there are multiple migration files in the directory what order are they ran?\n"},"comment":{"url":"https://api.github.com/repos/sequelize/cli/issues/comments/441618445","html_url":"https://github.com/sequelize/cli/issues/133#issuecomment-441618445","issue_url":"https://api.github.com/repos/sequelize/cli/issues/133","id":441618445,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTYxODQ0NQ==","user":{"login":"sathiz1993","id":24601990,"node_id":"MDQ6VXNlcjI0NjAxOTkw","avatar_url":"https://avatars3.githubusercontent.com/u/24601990?v=4","gravatar_id":"","url":"https://api.github.com/users/sathiz1993","html_url":"https://github.com/sathiz1993","followers_url":"https://api.github.com/users/sathiz1993/followers","following_url":"https://api.github.com/users/sathiz1993/following{/other_user}","gists_url":"https://api.github.com/users/sathiz1993/gists{/gist_id}","starred_url":"https://api.github.com/users/sathiz1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sathiz1993/subscriptions","organizations_url":"https://api.github.com/users/sathiz1993/orgs","repos_url":"https://api.github.com/users/sathiz1993/repos","events_url":"https://api.github.com/users/sathiz1993/events{/privacy}","received_events_url":"https://api.github.com/users/sathiz1993/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T12:14:02Z","updated_at":"2018-11-26T12:14:02Z","author_association":"NONE","body":"Hello .... I encountered the same scenario where I need to add multiple columns in one migration and this works for me.\r\n```\r\n'use strict';\r\n\r\nmodule.exports = {\r\n    up: (queryInterface, Sequelize) => {\r\n        return Promise.all([\r\n            queryInterface.addColumn('table_1','column_5', {\r\n                    type: Sequelize.ENUM,\r\n                    defaultValue: 'unverified',\r\n                    values: [\r\n                        'unverified', 'updated'\r\n                    ]\r\n            }),\r\n            queryInterface.addColumn('table_1','column_6', {\r\n                    type: Sequelize.BOOLEAN,\r\n                    defaultValue: 0,\r\n            }),\r\n            queryInterface.addColumn('table_1', 'column_7', {\r\n                    type: Sequelize.BOOLEAN,\r\n                    defaultValue: 0,\r\n            })\r\n        ])\r\n    },\r\n    down: (queryInterface, Sequelize) => {\r\n        return Promise.all([\r\n            queryInterface.removeColumn('table_1', 'column_5'),\r\n            queryInterface.removeColumn('table_2', 'column_6'),\r\n            queryInterface.removeColumn('table_3', 'column_7')\r\n        ])\r\n    }\r\n};\r\n```"}}
{"actor":{"display_login":"sathiz1993"}}