{"action":"opened","issue":{"url":"https://api.github.com/repos/rails/rails/issues/32963","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/32963/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/32963/comments","events_url":"https://api.github.com/repos/rails/rails/issues/32963/events","html_url":"https://github.com/rails/rails/issues/32963","id":325629289,"number":32963,"title":"Strange behavior of SCOPE variable in db:migrate task","user":{"login":"Loriowar","id":2118479,"avatar_url":"https://avatars0.githubusercontent.com/u/2118479?v=4","gravatar_id":"","url":"https://api.github.com/users/Loriowar","html_url":"https://github.com/Loriowar","followers_url":"https://api.github.com/users/Loriowar/followers","following_url":"https://api.github.com/users/Loriowar/following{/other_user}","gists_url":"https://api.github.com/users/Loriowar/gists{/gist_id}","starred_url":"https://api.github.com/users/Loriowar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Loriowar/subscriptions","organizations_url":"https://api.github.com/users/Loriowar/orgs","repos_url":"https://api.github.com/users/Loriowar/repos","events_url":"https://api.github.com/users/Loriowar/events{/privacy}","received_events_url":"https://api.github.com/users/Loriowar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-23T09:46:20Z","updated_at":"2018-05-23T09:46:20Z","closed_at":null,"author_association":"NONE","body":"### Steps to reproduce\r\n\r\nCreate below migrations with arbitrary content:\r\n1. `20180523073344_create_users.rb`\r\n2. `20180523073355_migrate_users.data_migrations.rb`\r\n3. `20180523073359_create_accounts.rb`\r\n\r\nRun:\r\n* firstly `rails db:migrate SCOPE=`\r\n* then `rails db:migrate SCOPE=data_migrations`\r\n\r\n### Expected behavior\r\nAfter `rails db:migrate SCOPE=` executed only migrations 1 and 3.\r\nAfter `rails db:migrate SCOPE=data_migrations` executed only migration 2.\r\nAfter `rails db:migrate` executed all migrations 1, 2, 3.\r\n\r\n### Actual behavior\r\nResult of `rails db:migrate SCOPE=` and `rails db:migrate` is identical and executed all migrations 1, 2, 3.\r\n\r\n#### Suggensuin\r\nIs `scope.blank?` in [database_tasks.rb:184](https://github.com/rails/rails/blob/master/activerecord/lib/active_record/tasks/database_tasks.rb#L184) is important? May we change it to `scope.nil?`.\r\n\r\n### System configuration\r\n**Rails version**: 5.0.6\r\n\r\n**Ruby version**: 2.4.2p198\r\n"}}
{"actor":{"display_login":"Loriowar"}}