Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | applies new string literal convention in activerecord/test | Xavier Noria | 2016-08-06 | 1 | -10/+10 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Removed mocha from Active Record Part 2 | Ronak Jangir | 2015-09-16 | 1 | -1/+2 |
| | |||||
* | Add reversible syntax for change_column_default | Prem Sichanugrist | 2015-06-26 | 1 | -0/+10 |
| | | | | | | | | | | | | | 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 | -0/+5 |
| | | | | | | | | | 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 | -1/+30 |
| | |||||
* | add test to ensure `remove_reference` with index and fk is invertable. | Yves Senn | 2015-02-11 | 1 | -0/+5 |
| | |||||
* | Failure to rollback t.timestamps when within a change_table migration | noam | 2014-12-03 | 1 | -2/+2 |
| | | | | | | | | | | | | | When running the following migration: change_table(:table_name) { |t| t/timestamps } The following error was produced: wrong number of arguments (2 for 1) .... /connection_adapters/abstract/schema_statements.rb:851:in `remove_timestamps' This is due to `arguments` containing an empty hash as its second argument. | ||||
* | fk: infere column name from table names. | Yves Senn | 2014-06-26 | 1 | -0/+5 |
| | | | | This allows to create and remove foreign keys without specifying a column. | ||||
* | fk: make `add_foreign_key` reversible. | Yves Senn | 2014-06-26 | 1 | -0/+20 |
| | |||||
* | Add test cases for Migration#inverse_of | Aditya Kapoor | 2014-06-17 | 1 | -0/+17 |
| | |||||
* | Drop the correct index after reverting a migration | Hubert Dąbrowski | 2014-02-13 | 1 | -3/+3 |
| | | | | | | 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_table use object of current database adapter | Nishant Modak | 2014-01-07 | 1 | -1/+2 |
| | | | | | | | | | - 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 | -0/+10 |
| | | | | | If 'enable_extension' is used in a migration's 'change' method, use 'disable_extension' on down migration (and vice-versa). | ||||
* | Make execute, change_column and remove_columns methods actually irreversible | Marc-Andre Lafortune | 2012-12-21 | 1 | -1/+7 |
| | | | | [#8267] | ||||
* | Make change_table reversible when possible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -0/+20 |
| | |||||
* | Factorize methods that are easily reversible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -8/+8 |
| | |||||
* | Make remove_index reversible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -3/+24 |
| | |||||
* | Differentiate between remove_column and remove_columns. Make remove_column ↵ | Marc-Andre Lafortune | 2012-12-21 | 1 | -1/+12 |
| | | | | | | reversible. [#8267] | ||||
* | Make drop_table reversible [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -11/+24 |
| | |||||
* | Add drop_join_table [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -4/+10 |
| | |||||
* | Allow reverting of migration commands with Migration#revert [#8267] | Marc-Andre Lafortune | 2012-12-21 | 1 | -48/+51 |
| | |||||
* | Make references statements reversible | Aleksey Magusev | 2012-07-03 | 1 | -3/+27 |
| | |||||
* | Add `create_join_table` migration helper to create HABTM join tables | Rafael Mendonça França | 2012-01-27 | 1 | -0/+12 |
| | |||||
* | Fix GH #4285. Remove options when we record calling creat_table | kennyj | 2012-01-04 | 1 | -0/+6 |
| | |||||
* | Fixed bad options order in ↵ | jbbarth | 2011-08-28 | 1 | -2/+2 |
| | | | | ActiveRecord::Migration::CommandRecorder#invert_rename_index | ||||
* | Reversing the changes done in c278a2c while still resolving #1857. | Vijay Dev | 2011-07-02 | 1 | -5/+3 |
| | | | | | | | | | The changes broke bulk migration tests and were fixed in 4d256bc6; however that brought back the issue of #1857 and so this commit goes back to the original scenario and just adds change_table to the list of methods which are to be recorded in the CommandRecorder. The method_missing now delegates all calls to the underlying connection as before. | ||||
* | CommandRecorder should delegate in method_missing where possible. Fixes some ↵ | Jon Leighton | 2011-06-30 | 1 | -1/+6 |
| | | | | tests in migration_test.rb under mysql. The problem was introduced in c278a2c5e109204ec8a47fcbfdfc327aad7996ce. | ||||
* | record unsupported methods in CommandRecorder instead of letting the ↵ | Vijay Dev | 2011-06-25 | 1 | -3/+5 |
| | | | | unsupported methods go through to the underlying db causing errors like duplicate columns to occur when rolling back migrations | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -1/+1 |
| | | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. | ||||
* | Added a test to check for correct behaviour with no options in add_index ↵ | David Workman | 2011-05-24 | 1 | -0/+6 |
| | | | | command recorder | ||||
* | Simple fix for correctly inverting an add_index migration when a name has ↵ | David Workman | 2011-05-23 | 1 | -0/+6 |
| | | | | been provided | ||||
* | Add :bulk => true option to change_table | Pratik Naik | 2011-01-31 | 1 | -1/+1 |
| | |||||
* | command recorder will record commands sent to a delegate object | Aaron Patterson | 2010-11-19 | 1 | -0/+22 |
| | |||||
* | IrreversibleMigration is raised if we cannot invert the command | Aaron Patterson | 2010-11-19 | 1 | -0/+7 |
| | |||||
* | commands are reversed | Aaron Patterson | 2010-11-19 | 1 | -0/+7 |
| | |||||
* | partial implementation of the command recorder | Aaron Patterson | 2010-11-19 | 1 | -0/+72 |