| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Some places we can't remove because Ruby still don't have a method
equivalent to strip_heredoc to be called in an already existent string.
|
|\
| |
| | |
Add :nodoc: to activerecord [ci skip]
|
| | |
|
|/
|
|
| |
Closes #24190
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
|
|
|
|
|
|
| |
Follow up of 03d3f036.
Some of `respond_to?` were replaced to `respond_to_missing?` in 03d3f036.
But the visibility is still public. It should be private.
|
|
|
|
|
|
| |
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772.
But comments was still kept absolute position. This commit aligns
comments with method definitions for consistency.
|
|
|
|
|
|
| |
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772.
But heredocs was still kept absolute position. This commit aligns
heredocs indentation for consistency.
|
|
|
|
|
|
|
|
|
|
| |
This was almost every case where we are overriding `respond_to?` in a
way that mirrors a parallel implementation of `method_missing`. There is
one remaining case in Active Model that should probably do the same
thing, but had a sufficiently strange implementation that I want to
investigate it separately.
Fixes #26333.
|
| |
|
|
|
|
| |
documentations [ci skip]
|
|\
| |
| |
| | |
Add detailed error message to `IrreversibleMigration`
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
[ci skip] Update what methods `Migration#change` can reverse
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Documentations and comments about what methods
`Migration#change` can reverse is out of date.
For example `change_column_default` is now reversible
by this [commit](https://github.com/rails/rails/pull/20018).
* Comments about `CommandRecorder` dose not match with Rails Guide.
For example `add_foreign_key` is listed only on Rails Guide.
|
|\ \ \
| |/ /
|/| | |
Make revert of `disable_extension` to work
|
| |/
| |
| |
| |
| |
| | |
This is fix of #11826 which miss to add `disable_extension` to
`ReversibleAndIrreversibleMethods`. So `CommandRecorder#method_missing`
catches `change_column_default` and @delegate's method is called.
|
|\ \
| |/
|/| |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This is fix of #20018 which removes `change_column_default` from
array, so `CommandRecorder#method_missing` catches
`change_column_default` and @delegate's method is called.
This PR
* fix this bug
* define `ReversibleAndIrreversibleMethods` const making clear
which this array means to prevent these miss
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Passing `:from` and `:to` to `change_column_default` makes this command
reversible as user has defined its previous state.
So, instead of having the migration command as:
change_column_default(:posts, :state, "draft")
They can write it as:
change_column_default(:posts, :state, from: nil, to: "draft")
|
|
|
|
|
|
|
|
|
| |
This used to raise a `IrreversibleMigration` error (since #10437).
However since `remove_index :table, :column` is probably the most basic
use-case we should make it reversible again.
Conflicts:
activerecord/CHANGELOG.md
|
| |
|
|\
| |
| | |
Added documentation for change_table
|
| | |
|
| | |
|
| |
| |
| |
| | |
This allows to create and remove foreign keys without specifying a column.
|
|/ |
|
|
|
|
|
|
| |
Previously when reverting a migration which added a named index it
would instead drop a corresponding index with matching columns but
without a name.
|
|
|
|
| |
Closes #13623.
|
|
|
|
|
|
|
|
|
| |
- Earlier, change_table was creating database-agnostic object.
- After this change, it will create correct object based on current
database adapter.
- This will ensure that create_table and change_table will get same objects.
- This makes update_table_definition method public and nodoc.
- Fixes #13577 and #13503
|
|
|
|
|
| |
If 'enable_extension' is used in a migration's 'change' method, use
'disable_extension' on down migration (and vice-versa).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #10419
Following code should raise IrreversibleMigration. But the code was
failing since options is an array and not a hash.
def change
change_table :users do |t|
t.remove_index [:name, :email]
end
end
Fix was to check if the options is a Hash before operating on it.
|
|
|
|
|
|
|
|
| |
* Fix Migration#reversible by not using `transaction`.
* Adapt mysql adapter to updated api for remove_column
* Update test after aedcd683684d08eaf30623a4b48ce31a31426372
|
| |
|
|
|
|
| |
[#8267]
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
reversible.
[#8267]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|