aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration/rename_table_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* `#tables` and `#table_exists?` and returns only tables and not viewsRafael Mendonça França2016-12-291-2/+2
|
* improve error message when include assertions failMichael Grosser2016-09-161-1/+1
| | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-10/+10
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Remove unnecessary enable,disable_extension on testsFumiaki MATSUSHIMA2016-01-021-2/+0
| | | | | | | uuid-ossp extension is alreadly enabled on test schema. And `disable_extension!('uuid-ossp', connection)` can be a cause of test failure. `ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR: function uuid_generate_v1() does not exist` will happen depending on the execution order.
* Deprecate `#table_exists?`, `#tables` and passing arguments to `#talbes`yui-knk2015-11-091-2/+2
| | | | | | | | | | Reported on #21509, how views is treated by `#tables` are differ by each adapters. To fix this different behavior, after Rails 5.0 is released, deprecate `#tables`. And `#table_exists?` would check both tables and views. To make their behavior consistent with `#tables`, after Rails 5.0 is released, deprecate `#table_exists?`.
* Closes rails/rails#18864: Renaming transactional fixtures to transactional testsBrandon Weiss2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I’m renaming all instances of `use_transcational_fixtures` to `use_transactional_tests` and “transactional fixtures” to “transactional tests”. I’m deprecating `use_transactional_fixtures=`. So anyone who is explicitly setting this will get a warning telling them to use `use_transactional_tests=` instead. I’m maintaining backwards compatibility—both forms will work. `use_transactional_tests` will check to see if `use_transactional_fixtures` is set and use that, otherwise it will use itself. But because `use_transactional_tests` is a class attribute (created with `class_attribute`) this requires a little bit of hoop jumping. The writer method that `class_attribute` generates defines a new reader method that return the value being set. Which means we can’t set the default of `true` using `use_transactional_tests=` as was done previously because that won’t take into account anyone using `use_transactional_fixtures`. Instead I defined the reader method manually and it checks `use_transactional_fixtures`. If it was set then it should be used, otherwise it should return the default, which is `true`. If someone uses `use_transactional_tests=` then it will overwrite the backwards-compatible method with whatever they set.
* tests, use `drop_table if_exists: true` in our test suite.Yves Senn2015-01-201-2/+2
|
* Add firebird support to test suiteRay Zane2015-01-051-18/+20
|
* Added enable_extension! to helperAbdelkader Boudih2014-09-051-1/+2
|
* rename sequence only if it existsAbdelkader Boudih2014-06-271-0/+10
|
* pg, `reset_pk_sequence!` respects schemas. Closes #14719.Yves Senn2014-05-301-1/+1
|
* Remove dead test code for unsupported adaptersSean Griffin2014-05-171-8/+0
|
* Remove more skipRafael Mendonça França2013-11-081-2/+0
|
* Don't skip tests if we don't need to.Rafael Mendonça França2013-11-081-23/+25
| | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed.
* also rename indexes when a table or column is renamedYves Senn2013-02-201-1/+11
| | | | When a table or a column is renamed related indexes kept their name. This will lead to confusing names. This patch renames related indexes when a column or a table is renamed. Only indexes with names generated by rails will be renamed. Indexes with custom names will not be renamed.
* Add teardown method to AR::Mig::RenameTableTestRobb Kidd2012-07-101-18/+13
| | | | | | | Dry up reseting the renamed table after each test. Also made use of the AR::Base.connection object already available from AR::MigrationTest#connection.
* Update psql adapter to rename a default pkey sequence when renaming a table.Robb Kidd2012-06-271-0/+13
|
* fixing test class nameAaron Patterson2012-01-131-1/+1
|
* adding a test class for table renamingAaron Patterson2012-01-131-0/+72