1. 20 4月, 2019 3 次提交
    • E
      Remove description for namespaced `db:migrate:up` · 5cc74660
      eileencodes 提交于
      This was accidentally left in, the standard `db:migrate:up` doesn't have
      a description so `db:migrate:up:namespace` shouldn't have one either.
      5cc74660
    • E
      Merge pull request #36039 from eileencodes/add-up-and-down-to-multi-db-rake-tasks · 92c46437
      Eileen M. Uchitelle 提交于
      Handle up/down for multiple databases
      92c46437
    • E
      Handle up/down for multiple databases · f9244c65
      eileencodes 提交于
      This change adds the ability to run up/down for a database in a multi-db
      environment.
      
      If you have an app with a primary and animals database the following
      tasks will be generated:
      
      ```
      VERSION=123 rake db:migrate:up:primary
      VERSION=123 rake db:migrate:up:primary
      
      VERSION=123 rake db:migrate:down:primary
      VERSION=123 rake db:migrate:up:animals
      ```
      
      I didn't generate descriptions with them since we don't generate a
      description for a single database application.
      
      In addition to this change I've made it so if your application has
      multiple databases Rails will raise if you try to run `up` or `down`
      without a namespace. This is because we don't know which DB you want to
      run `up` or `down` against unless the app tells us, so it's safer to
      just block it and recommend using namespaced versions of up/down
      respectively.
      
      The output for the raise looks like:
      
      ```
      You're using a multiple database application. To use `db:migrate:down`
      you must run the namespaced task with a VERSION. Available tasks are
      db:migrate:down:primary and db:migrate:down:animals.
      ```
      f9244c65
  2. 19 4月, 2019 33 次提交
  3. 18 4月, 2019 4 次提交