Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use algorithm while removing index with db:rollback | Mehmet Emin İNAÇ | 2017-09-21 | 1 | -2/+2 |
| | | | | Closes #24190 | ||||
* | Use frozen-string-literal in ActiveRecord | Kir Shatrov | 2017-07-19 | 1 | -0/+2 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | `respond_to_missing?` should be private | Ryuta Kamizono | 2017-04-22 | 1 | -6/+6 |
| | | | | | | | 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. | ||||
* | Fix broken comments indentation caused by rubocop auto-correct [ci skip] | Ryuta Kamizono | 2016-09-14 | 1 | -1/+1 |
| | | | | | | 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. | ||||
* | Fix broken heredoc indentation caused by rubocop auto-correct | Ryuta Kamizono | 2016-09-03 | 1 | -4/+4 |
| | | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But heredocs was still kept absolute position. This commit aligns heredocs indentation for consistency. | ||||
* | Override `respond_to_missing?` instead of `respond_to?` when possible | Sean Griffin | 2016-08-31 | 1 | -1/+1 |
| | | | | | | | | | | 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. | ||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -88/+88 |
| | |||||
* | adding basic change_column and remove_columns in CommandRecorder ↵ | Gaurav Sharma | 2015-09-29 | 1 | -0/+2 |
| | | | | documentations [ci skip] | ||||
* | Merge pull request #21412 from yui-knk/feature/irreversible_migration_error_msg | Yves Senn | 2015-09-04 | 1 | -1/+6 |
|\ | | | | | | | Add detailed error message to `IrreversibleMigration` | ||||
| * | Add detailed error message to `IrreversibleMigration` | yui-knk | 2015-08-30 | 1 | -1/+6 |
| | | |||||
| * | Add detailed error message to `IrreversibleMigration` | yui-knk | 2015-08-28 | 1 | -1/+1 |
| | | |||||
| * | Add detailed error message to `IrreversibleMigration` | yui-knk | 2015-08-28 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #21432 from yui-knk/fix/what_change_method_can_reverse | Sean Griffin | 2015-08-30 | 1 | -1/+13 |
|\ \ | | | | | | | [ci skip] Update what methods `Migration#change` can reverse | ||||
| * | | [ci skip] Update what methods `Migration#change` can reverse | yui-knk | 2015-08-31 | 1 | -1/+13 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. | ||||
* | | | Merge pull request #21429 from yui-knk/fix/revert_disable_extension | Sean Griffin | 2015-08-30 | 1 | -1/+1 |
|\ \ \ | |/ / |/| | | Make revert of `disable_extension` to work | ||||
| * | | Make revert of `disable_extension` to work | yui-knk | 2015-08-30 | 1 | -1/+1 |
| |/ | | | | | | | | | | | 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. | ||||
* | | Merge branch 'master' of github.com:rails/docrails | Vijay Dev | 2015-08-30 | 1 | -1/+1 |
|\ \ | |/ |/| | |||||
| * | [ci skip] Capitalize comments | yui-knk | 2015-08-29 | 1 | -1/+1 |
| | | |||||
* | | Make `change_column_default` to work | yui-knk | 2015-08-25 | 1 | -8/+8 |
|/ | | | | | | | | | | | | 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 | ||||
* | Add reversible syntax for change_column_default | Prem Sichanugrist | 2015-06-26 | 1 | -1/+11 |
| | | | | | | | | | | | | | 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") | ||||
* | make `remove_index :table, :column` reversible. | Yves Senn | 2015-06-15 | 1 | -7/+9 |
| | | | | | | | | | 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 | ||||
* | Add an invert method for remove_foreign_key | Aster Ryan | 2015-06-11 | 1 | -0/+10 |
| | |||||
* | Merge pull request #16305 from tomkadwill/documented_change_table | Rafael Mendonça França | 2014-07-28 | 1 | -1/+1 |
|\ | | | | | Added documentation for change_table | ||||
| * | Added nodoc to change_table | Tom Kadwill | 2014-07-28 | 1 | -1/+1 |
| | | |||||
* | | fk: review corrections: indent, visibility, syntax, wording. | Yves Senn | 2014-06-26 | 1 | -3/+3 |
| | | |||||
* | | fk: infere column name from table names. | Yves Senn | 2014-06-26 | 1 | -1/+3 |
| | | | | | | | | This allows to create and remove foreign keys without specifying a column. | ||||
* | | fk: make `add_foreign_key` reversible. | Yves Senn | 2014-06-26 | 1 | -1/+16 |
|/ | |||||
* | Drop the correct index after reverting a migration | Hubert Dąbrowski | 2014-02-13 | 1 | -1/+6 |
| | | | | | | Previously when reverting a migration which added a named index it would instead drop a corresponding index with matching columns but without a name. | ||||
* | make `change_column_null` reversible. Closes #13576. | Yves Senn | 2014-01-08 | 1 | -1/+6 |
| | | | | Closes #13623. | ||||
* | Make change_table use object of current database adapter | Nishant Modak | 2014-01-07 | 1 | -4/+6 |
| | | | | | | | | | - 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 | ||||
* | Make 'enable_extension' revertible | Eric Tipton | 2013-08-10 | 1 | -1/+2 |
| | | | | | If 'enable_extension' is used in a migration's 'change' method, use 'disable_extension' on down migration (and vice-versa). | ||||
* | raise IrreversibleMigration if no column given | Neeraj Singh | 2013-05-06 | 1 | -1/+4 |
| | | | | | | | | | | | | | | | 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. | ||||
* | Fixes for PR [#8267] | Marc-Andre Lafortune | 2012-12-22 | 1 | -1/+2 |
| | | | | | | | | * Fix Migration#reversible by not using `transaction`. * Adapt mysql adapter to updated api for remove_column * Update test after aedcd683684d08eaf30623a4b48ce31a31426372 | ||||
* | Remove duplicated methods in command recorder and duplicated test name | Carlos Antonio da Silva | 2012-12-21 | 1 | -3/+3 |
| | |||||
* | Make execute, change_column and remove_columns methods actually irreversible | Marc-Andre Lafortune | 2012-12-21 | 1 | -1/+2 |
| | | | | [#8267] | ||||
* | Make change_table reversible when possible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -1/+5 |
| | |||||
* | Factorize methods that are easily reversible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -34/+20 |
| | |||||
* | Make remove_index reversible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -4/+10 |
| | |||||
* | Differentiate between remove_column and remove_columns. Make remove_column ↵ | Marc-Andre Lafortune | 2012-12-21 | 1 | -2/+7 |
| | | | | | | reversible. [#8267] | ||||
* | Make drop_table reversible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -3/+10 |
| | |||||
* | Add drop_join_table [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -3/+6 |
| | |||||
* | Add Migration#reversible for reversible data operations [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -1/+5 |
| | |||||
* | Allow reverting of migration commands with Migration#revert [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -17/+36 |
| | |||||
* | Split ridiculously long line | Marc-Andre Lafortune | 2012-12-21 | 1 | -1/+4 |
| | |||||
* | Make references statements reversible | Aleksey Magusev | 2012-07-03 | 1 | -1/+13 |
| | |||||
* | Add `create_join_table` migration helper to create HABTM join tables | Rafael Mendonça França | 2012-01-27 | 1 | -2/+10 |
| | |||||
* | Fix GH #4285. Remove options when we record calling creat_table | kennyj | 2012-01-04 | 1 | -1/+1 |
| | |||||
* | Fixed bad options order in ↵ | jbbarth | 2011-08-28 | 1 | -1/+1 |
| | | | | ActiveRecord::Migration::CommandRecorder#invert_rename_index |