aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration/rename_column_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* rename_column_test.rb -> columns_test.rb to reveal intent.Yves Senn2013-02-231-264/+0
| | | | | | | | I renamed the test to better communicate it's intention. Since it also tests: - add_column - remove_column - change_column There is no reason to call it rename_column_test.
* forwardport #9388 rename/remove column preserves custom PK.Yves Senn2013-02-231-1/+15
|
* also rename indexes when a table or column is renamedYves Senn2013-02-201-2/+23
| | | | 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.
* reserve index name chars for internal rails operationsYves Senn2013-02-201-0/+11
| | | | | | | | | | | Some adapter (SQLite3) need to perform renaming operations to support the rails DDL. These rename prefixes operate with prefixes. When an index name already uses up the full space provieded by `index_name_length` these internal operations will fail. This patch introduces `allowed_index_name_length` which respects the amount of characters used for internal operations. It will always be <= `index_name_length` and every adapter can define how many characters need to be reserved.
* Address a failure test_remove_column_with_multi_column_index with Oracle ↵Yasuo Honda2013-01-021-2/+3
| | | | | | | database Not only PostgreSQL, Oracle database adapter drops the multi-column index if any of the indexed columns dropped by remove_column.
* work off FIXME comments in AR rename_column_test.rbYves Senn2012-12-281-9/+22
| | | | | | There were a couple of tests, which had FIXME comments in palce of assertions. I replaced these FIXME comments with actual assertions to get more feedback from our test suite.
* Keep index names when using with sqlite3Yves Senn2012-12-191-0/+10
|
* Remove ActiveRecord::Base.to_aJon Leighton2012-08-031-2/+2
| | | | | On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
* ActiveRecord::Base.all returns a Relation.Jon Leighton2012-07-271-2/+2
| | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway.
* remove calls to find(:first), find(:last) and find(:all)Jon Leighton2012-04-261-3/+3
|
* columns method doesn't have name argumentRafael Mendonça França2012-02-021-5/+4
|
* test code that finds migrationsAaron Patterson2012-01-131-0/+4
|
* fixing test class nameAaron Patterson2012-01-131-1/+1
|
* moving more column renaming testsAaron Patterson2012-01-131-0/+75
|
* moving more renaming tests to the proper test caseAaron Patterson2012-01-131-0/+63
|
* moving rename column tests to their own classAaron Patterson2012-01-131-0/+53