1. 07 9月, 2015 1 次提交
  2. 02 8月, 2015 1 次提交
    • S
      Add run_cmd class method to ActiveRecord::Tasks::DatabaseTasks · 07f8a96a
      starbelly 提交于
        -   Added run_cmd() class method to dry up Kernel.system() messages within
            this namespace and avoid shell expansion by passing a list of
            arguments instead of a string
      
        -   Update structure_dump, structure_load, and related tests units to
            pass a list of params instead of using a string to
            avoid shell expansion
      07f8a96a
  3. 04 3月, 2015 1 次提交
  4. 24 12月, 2014 1 次提交
  5. 23 12月, 2014 1 次提交
  6. 18 12月, 2014 1 次提交
    • Y
      `db:structure:load` and `db:schema:load` no longer purge the database. · 36ce0c2c
      Yves Senn 提交于
      Closes #17945
      
      `db:test:prepare` still purges the database to always keep the test
      database in a consistent state.
      
      This patch introduces new problems with `db:schema:load`. Prior
      to the introduction of foreign-keys, we could run this file against
      a non-empty database. Since every `create_table` containted the
      `force: true` option, this would recreate tables when loading the schema.
      
      However with foreign-keys in place, `force: true` wont work anymore and
      the task will crash.
      
      /cc @schneems
      36ce0c2c
  7. 01 11月, 2014 1 次提交
  8. 29 10月, 2014 1 次提交
    • X
      let's warn with heredocs · b3bfa361
      Xavier Noria 提交于
      The current style for warning messages without newlines uses
      concatenation of string literals with manual trailing spaces
      where needed.
      
      Heredocs have better readability, and with `squish` we can still
      produce a single line.
      
      This is a similar use case to the one that motivated defining
      `strip_heredoc`, heredocs are super clean.
      b3bfa361
  9. 04 9月, 2014 1 次提交
  10. 30 8月, 2014 2 次提交
  11. 29 8月, 2014 1 次提交
    • G
      Avoid using heredoc for user warnings · 8c52480b
      Godfrey Chan 提交于
      Using heredoc would enforce line wrapping to whatever column width we decided to
      use in the code, making it difficult for the users to read on some consoles.
      
      This does make the source code read slightly worse and a bit more error-prone,
      but this seems like a fair price to pay since the primary purpose for these
      messages are for the users to read and the code will not stick around for too
      long.
      8c52480b
  12. 06 8月, 2014 2 次提交
  13. 01 8月, 2014 1 次提交
  14. 28 7月, 2014 1 次提交
  15. 02 7月, 2014 1 次提交
  16. 27 6月, 2014 1 次提交
  17. 17 6月, 2014 1 次提交
  18. 14 6月, 2014 1 次提交
  19. 12 6月, 2014 1 次提交
  20. 15 4月, 2014 1 次提交
  21. 08 1月, 2014 1 次提交
  22. 02 1月, 2014 1 次提交
    • J
      Automatically maintain test database schema · ff7ab3bc
      Jon Leighton 提交于
      * Move check from generated helper to test_help.rb, so that all
        applications can benefit
      * Rather than just raising when the test schema has pending migrations,
        try to load in the schema and only raise if there are pending
        migrations afterwards
      * Opt out of the check by setting
        config.active_record.maintain_test_schema = false
      * Deprecate db:test:* tasks. The test helper is now fully responsible
        for maintaining the test schema, so we don't need rake tasks for this.
        This is also a speed improvement since we're no longer reloading the
        test database on every call to "rake test".
      ff7ab3bc
  23. 26 12月, 2013 1 次提交
  24. 24 12月, 2013 1 次提交
    • J
      Guarantee the connection resolver handles string values · c390e608
      José Valim 提交于
      This commit also cleans up the rake tasks that were checking
      for DATABASE_URL in different places.
      
      In fact, it would be nice to deprecate DATABASE_URL usage in the long
      term, considering the direction we are moving of allowing those in .yml
      files.
      c390e608
  25. 19 11月, 2013 1 次提交
  26. 11 11月, 2013 1 次提交
    • J
      Explicitly exit with status "1" for create and drop failures · 22f80ae5
      Jay Hayes 提交于
      * A non-zero exit status allows subsequent shell commands to be chained
        together such as: `rake db:reset test:prepare && rspec && cap deploy`
        (if you're feeling brave :)
      * Any exceptions raised during the `create` and `drop` tasks are caught
        in order to print a "pretty" message to the user. Unfortunately doing
        so prevents rake from aborting with a non-zero exit status to the shell.
      * Therefore we re-raise the exceptions after the "pretty" message and
        re-catch them in the task.
      * From the task we explicitly exit with a non-zero status. This method
        was chosen (rather than just letting rake fail from the exception) so
        that the backtrace is suppressed and the output to stderr is
        unchanged.
      * Update activerecord CHANGELOG
      22f80ae5
  27. 01 11月, 2013 1 次提交
  28. 08 8月, 2013 1 次提交
  29. 05 6月, 2013 3 次提交
  30. 01 5月, 2013 1 次提交
  31. 25 4月, 2013 5 次提交
  32. 24 4月, 2013 1 次提交