{"action":"created","issue":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/6423","repository_url":"https://api.github.com/repos/sequelize/sequelize","labels_url":"https://api.github.com/repos/sequelize/sequelize/issues/6423/labels{/name}","comments_url":"https://api.github.com/repos/sequelize/sequelize/issues/6423/comments","events_url":"https://api.github.com/repos/sequelize/sequelize/issues/6423/events","html_url":"https://github.com/sequelize/sequelize/issues/6423","id":170809996,"number":6423,"title":"underscore option should produce underscored_table_name and  underscored_field_name's","user":{"login":"alexey2baranov","id":19248996,"avatar_url":"https://avatars.githubusercontent.com/u/19248996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexey2baranov","html_url":"https://github.com/alexey2baranov","followers_url":"https://api.github.com/users/alexey2baranov/followers","following_url":"https://api.github.com/users/alexey2baranov/following{/other_user}","gists_url":"https://api.github.com/users/alexey2baranov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexey2baranov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexey2baranov/subscriptions","organizations_url":"https://api.github.com/users/alexey2baranov/orgs","repos_url":"https://api.github.com/users/alexey2baranov/repos","events_url":"https://api.github.com/users/alexey2baranov/events{/privacy}","received_events_url":"https://api.github.com/users/alexey2baranov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-12T06:55:05Z","updated_at":"2016-08-12T07:03:27Z","closed_at":null,"body":"It would be great if sequelize will generate PostgreSQL DDL with lower_case_underscored table name and column names. By now _underscore_ option manage foreign keys and create_at, modifed_at fields only.\r\n\r\nIn short \r\n\r\n`CREATE TABLE IF NOT EXISTS \"Male\" (\"CamelCase\" VARCHAR(255), \"created_at\" TIMESTAMP WITH TIME ZONE NOT NULL, \"updated_at\" TIMESTAMP WITH TIME ZONE NOT NULL);`\r\n\r\nshould become\r\n\r\n`CREATE TABLE IF NOT EXISTS male (camel_case VARCHAR(255), \"created_at\" TIMESTAMP WITH TIME ZONE NOT NULL, \"updated_at\" TIMESTAMP WITH TIME ZONE NOT NULL);`\r\n\r\n\r\nmy global config is\r\n\r\n```\r\n{\r\n    \"username\": \"\",\r\n    \"password\": \"\",\r\n    \"database\": \"\",\r\n    \"host\": \"127.0.0.1\",\r\n    \"dialect\": \"postgres\",\r\n    \"define\":{\r\n      \"paranoid\":false,\r\n      \"timestamps\":true,\r\n      \"freezeTableName\": true,\r\n      \"underscored\": true\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/sequelize/sequelize/issues/comments/239375661","html_url":"https://github.com/sequelize/sequelize/issues/6423#issuecomment-239375661","issue_url":"https://api.github.com/repos/sequelize/sequelize/issues/6423","id":239375661,"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":"2016-08-12T07:03:27Z","updated_at":"2016-08-12T07:03:27Z","body":"I don't think this is needed - If users want underscored names, they can simply define them as such, or use the `field` option.\r\n\r\nThe `underscored` option is for controlling auto-generated column names, but when a user tells us about the column `fooBar`, we call it fooBar ;)\r\n\r\nThis can easily be solved with a `beforeDefine` hook"}}
{"actor":{"display_login":"janmeier"}}