1. 07 2月, 2017 1 次提交
  2. 19 1月, 2017 2 次提交
  3. 18 1月, 2017 1 次提交
  4. 07 1月, 2017 1 次提交
  5. 05 1月, 2017 1 次提交
  6. 23 12月, 2016 1 次提交
  7. 29 10月, 2016 1 次提交
  8. 18 8月, 2016 1 次提交
    • T
      Added nil case handling to allow rollback migration in case of · 906ff07e
      travis.h.oneill@gmail.com 提交于
      invalid column type
          /activerecord/lib/active_record/connection_adapters
          /abstract/schema_definitions.rb:306
          type = type.to_sym
      
      Changed to the following to handle nil case:
          type = type.to_sym if type
      
      Added regression test for this case:
        /activerecord/test/cases/migration_test.rb:554
        if current_adapter?(:SQLite3Adapter)
          def test_allows_sqlite3_rollback_on_invalid_column_type
            Person.connection.create_table :something, force: true do |t|
              t.column :number, :integer
              t.column :name, :string
              t.column :foo, :bar
            end
            assert Person.connection.column_exists?(:something, :foo)
            assert_nothing_raised { Person.connection.remove_column :something, :foo, :bar }
            assert !Person.connection.column_exists?(:something, :foo)
            assert Person.connection.column_exists?(:something, :name)
            assert Person.connection.column_exists?(:something, :number)
          ensure
            Person.connection.drop_table :something, if_exists: true
          end
        end
      906ff07e
  9. 16 8月, 2016 1 次提交
  10. 08 8月, 2016 1 次提交
    • X
      code gardening: removes redundant selfs · a9dc4545
      Xavier Noria 提交于
      A few have been left for aesthetic reasons, but have made a pass
      and removed most of them.
      
      Note that if the method `foo` returns an array, `foo << 1`
      is a regular push, nothing to do with assignments, so
      no self required.
      a9dc4545
  11. 07 8月, 2016 5 次提交
  12. 02 7月, 2016 1 次提交
  13. 19 5月, 2016 1 次提交
  14. 01 5月, 2016 1 次提交
  15. 27 4月, 2016 1 次提交
    • Y
      update record specified in key · cfa1df4b
      yuuji.yaginuma 提交于
      `#first_or_initialize` does not use attributes to data acquisition.
      Therefore, there is a possibility of updating the different record than the one
      specified in the key, I think this is not expected behavior.
      cfa1df4b
  16. 24 3月, 2016 1 次提交
  17. 24 2月, 2016 2 次提交
  18. 23 2月, 2016 3 次提交
  19. 06 2月, 2016 1 次提交
  20. 01 2月, 2016 2 次提交
  21. 15 1月, 2016 3 次提交
  22. 12 1月, 2016 2 次提交
  23. 08 1月, 2016 2 次提交
    • S
    • S
      Prevent destructive action on production database · 900bfd94
      schneems 提交于
      This PR introduces a key/value type store to Active Record that can be used for storing internal values. It is an alternative implementation to #21237 cc @sgrif @matthewd.
      
      It is possible to run your tests against your production database by accident right now. While infrequently, but as an anecdotal data point, Heroku receives a non-trivial number of requests for a database restore due to this happening. In these cases the loss can be large.
      
      To prevent against running tests against production we can store the "environment" version that was used when migrating the database in a new internal table. Before executing tests we can see if the database is a listed in `protected_environments` and abort. There is a manual escape valve to force this check from happening with environment variable `DISABLE_DATABASE_ENVIRONMENT_CHECK=1`.
      900bfd94
  24. 17 12月, 2015 2 次提交
  25. 15 12月, 2015 1 次提交
  26. 20 11月, 2015 1 次提交