{"action":"created","issue":{"url":"https://api.github.com/repos/SchemaPlus/schema_plus_foreign_keys/issues/1","labels_url":"https://api.github.com/repos/SchemaPlus/schema_plus_foreign_keys/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/SchemaPlus/schema_plus_foreign_keys/issues/1/comments","events_url":"https://api.github.com/repos/SchemaPlus/schema_plus_foreign_keys/issues/1/events","html_url":"https://github.com/SchemaPlus/schema_plus_foreign_keys/issues/1","id":97293135,"number":1,"title":"docfix: name attribute for foreign key should be specified in index","user":{"login":"lowjoel","id":2505070,"avatar_url":"https://avatars.githubusercontent.com/u/2505070?v=3","gravatar_id":"","url":"https://api.github.com/users/lowjoel","html_url":"https://github.com/lowjoel","followers_url":"https://api.github.com/users/lowjoel/followers","following_url":"https://api.github.com/users/lowjoel/following{/other_user}","gists_url":"https://api.github.com/users/lowjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/lowjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowjoel/subscriptions","organizations_url":"https://api.github.com/users/lowjoel/orgs","repos_url":"https://api.github.com/users/lowjoel/repos","events_url":"https://api.github.com/users/lowjoel/events{/privacy}","received_events_url":"https://api.github.com/users/lowjoel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-26T07:00:18Z","updated_at":"2015-07-26T07:03:42Z","closed_at":null,"body":"Specifying\r\n\r\n```ruby\r\n    create_table :course_assessment_question_multiple_response_options do |t|\r\n      t.references :question,\r\n                   null: false,\r\n                   foreign_key: {\r\n                     name: :fk__course_assessment_multiple_response_option_question,\r\n                     references: :course_assessment_question_multiple_responses\r\n                   }\r\n    end\r\n```\r\n\r\nerrors with a name too long error. This works:\r\n\r\n```ruby\r\n    create_table :course_assessment_question_multiple_response_options do |t|\r\n      t.references :question,\r\n                   null: false,\r\n                   index: {\r\n                     name: :fk__course_assessment_multiple_response_option_question,\r\n                   },\r\n                   foreign_key: {\r\n                     references: :course_assessment_question_multiple_responses\r\n                   }\r\n    end\r\n```"},"comment":{"url":"https://api.github.com/repos/SchemaPlus/schema_plus_foreign_keys/issues/comments/124951906","html_url":"https://github.com/SchemaPlus/schema_plus_foreign_keys/issues/1#issuecomment-124951906","issue_url":"https://api.github.com/repos/SchemaPlus/schema_plus_foreign_keys/issues/1","id":124951906,"user":{"login":"lowjoel","id":2505070,"avatar_url":"https://avatars.githubusercontent.com/u/2505070?v=3","gravatar_id":"","url":"https://api.github.com/users/lowjoel","html_url":"https://github.com/lowjoel","followers_url":"https://api.github.com/users/lowjoel/followers","following_url":"https://api.github.com/users/lowjoel/following{/other_user}","gists_url":"https://api.github.com/users/lowjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/lowjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowjoel/subscriptions","organizations_url":"https://api.github.com/users/lowjoel/orgs","repos_url":"https://api.github.com/users/lowjoel/repos","events_url":"https://api.github.com/users/lowjoel/events{/privacy}","received_events_url":"https://api.github.com/users/lowjoel/received_events","type":"User","site_admin":false},"created_at":"2015-07-26T07:03:42Z","updated_at":"2015-07-26T07:03:42Z","body":"(don't ask why my schema names are so long, the app is crazy complex...)"}}