1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Akira Matsuda
9bb495e6ae Silence another test that runs migrations 2014-08-29 10:34:26 +09:00
Guo Xiang Tan
3baace687c Use teardown helper method.
Follow-Up to https://github.com/rails/rails/pull/14348

Ensure that SQLCounter.clear_log is called after each test.

This is a step to prevent side effects when running tests. This will allow us to run them in random order.
2014-03-14 20:48:59 -07:00
Yasuo Honda
d64673c8fe Skip test_migrate_revert_add_index_with_name if databases
do not allow to create duplicate indexes on the same columns
2014-02-25 21:53:30 +09:00
Hubert Dąbrowski
e1d4673102 Drop the correct index after reverting a migration
Previously when reverting a migration which added a named index it
would instead drop a corresponding index with matching columns but
without a name.
2014-02-13 17:18:16 +01:00
Neeraj Singh
86ac1d9bb2 fix failing test caused by 3771e4d511 2013-05-06 16:49:06 -04:00
Neeraj Singh
3771e4d511 raise IrreversibleMigration if no column given
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.
2013-05-06 15:16:42 -04:00
Marc-Andre Lafortune
a4932d6a63 Fixes for PR [#8267]
* Fix Migration#reversible by not using `transaction`.

* Adapt mysql adapter to updated api for remove_column

* Update test after aedcd68368
2012-12-22 20:40:42 -05:00
Marc-Andre Lafortune
af871a0623 Make drop_table reversible [#8267] 2012-12-21 13:54:52 -05:00
Marc-Andre Lafortune
99770e4c65 Add Migration#reversible for reversible data operations [#8267] 2012-12-21 13:54:51 -05:00
Marc-Andre Lafortune
65e154f33b Allow revert of whole migration [#8267] 2012-12-21 13:54:51 -05:00
Marc-Andre Lafortune
d327c1805a Allow reverting of migration commands with Migration#revert [#8267] 2012-12-21 13:54:51 -05:00
kennyj
c5ba4896ab migrate(:down) method with table_name_prefix 2012-01-11 00:35:06 +09:00
Christopher Meiklejohn
43fc814074 Ensure that .up and .down work as well. 2011-08-02 18:57:34 -07:00
Christopher Meiklejohn
74d7bfb200 Support backwards compatible interface for migration down/up with rails 3.0.x. 2011-08-02 18:55:59 -07:00
Aaron Patterson
61774e0d49 please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT 2011-06-06 15:47:13 -07:00
Jon Leighton
253bb6b926 Refactor Active Record test connection setup. Please see the 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. 2011-06-04 23:47:03 +01:00
Aaron Patterson
598fc85f9e fisting typeo, thanks @vinibaggio 2010-11-19 11:42:58 -08:00
Aaron Patterson
87124457e5 fisting my spelling errors 2010-11-19 10:55:57 -08:00
Renamed from activerecord/test/cases/invertable_migration_test.rb (Browse further)