1. 08 10月, 2016 1 次提交
  2. 16 9月, 2016 1 次提交
  3. 02 9月, 2016 1 次提交
  4. 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
  5. 16 8月, 2016 2 次提交
  6. 14 8月, 2016 1 次提交
  7. 10 8月, 2016 1 次提交
    • G
      Fix a NoMethodError schema_statements.rb · 01fbdb31
      Genadi Samokovarov 提交于
      If you call `remove_index` with wrong options, say a type, like I did,
      you get:
      
      ```
      == 20160810072541 RemoveUniqueIndexOnGoals: migrating =========================
      -- remove_index(:goal, {:coulmn=>:kid_id, :unique=>true})
      rails aborted!
      StandardError: An error has occurred, this and all later migrations canceled:
      
      undefined method `ArgumentError' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x007fb7dec91b28>
      ```
      
      What happened is that I mistyped column (coulmn) and got a
      `NoMethodError`, because of a missing comma during the raise. This made
      Ruby think we're calling the method `ArgumentError`.
      01fbdb31
  8. 07 8月, 2016 3 次提交
  9. 02 8月, 2016 1 次提交
  10. 16 7月, 2016 1 次提交
  11. 14 7月, 2016 1 次提交
  12. 08 7月, 2016 1 次提交
  13. 02 7月, 2016 1 次提交
  14. 10 6月, 2016 1 次提交
  15. 01 6月, 2016 1 次提交
    • S
      Respect options passed to `foreign_key` when reverting `add_reference` · 56a61e0c
      Sean Griffin 提交于
      The code incorrectly assumes that the option was written as
      `foreign_key: true`, but that is not always the case. This now mirrors
      the behavior of reverting `add_foreign_key`. The code was changed to use
      kwargs while I was touching it, as well.
      
      This could really use a refactoring to go through the same code paths as
      `add_refernce` in the future, so we don't duplicate default values.
      
      Fixes #25169
      56a61e0c
  16. 25 4月, 2016 2 次提交
  17. 24 4月, 2016 1 次提交
  18. 23 4月, 2016 2 次提交
  19. 21 4月, 2016 2 次提交
  20. 19 4月, 2016 1 次提交
  21. 17 4月, 2016 1 次提交
  22. 16 4月, 2016 1 次提交
  23. 27 3月, 2016 1 次提交
    • B
      Fix description for method... · 359749ac
      Bogdan 提交于
      Fix description for method ActiveRecord::ConnectionAdapters::SchemaStatements#add_timestamps [ci skip]
      359749ac
  24. 17 3月, 2016 1 次提交
  25. 10 3月, 2016 1 次提交
  26. 08 2月, 2016 1 次提交
  27. 04 2月, 2016 2 次提交
  28. 01 2月, 2016 1 次提交
  29. 30 1月, 2016 3 次提交
  30. 28 1月, 2016 1 次提交
    • M
      Fix a bug with initialize schema_migrations table · e0026e23
      Mikhail Grachev 提交于
      This line causes an error when executing the command: `rails db:drop db:create db:schema:load`
      
      ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR:  syntax error at or near "{"
      LINE 1: ...NSERT INTO "schema_migrations" (version) VALUES (#{v}), (#{v...
      e0026e23
  31. 27 1月, 2016 1 次提交