aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration/change_schema_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* add table.bigint supportAaron Patterson2014-10-151-0/+19
| | | | | | | | In the DSL you can now do: create_table(:foos) do |t| t.bigint :hi end
* Change the default `null` value for timestampsSean Griffin2014-08-121-2/+5
| | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* Don't type cast the default on the columnSean Griffin2014-06-171-7/+7
| | | | | | | If we want to have type decorators mess with the attribute, but not the column, we need to stop type casting on the column. Where possible, we changed the tests to test the value of `column_defaults`, which is public API. `Column#default` is not.
* fix `rake test_sqlite3_mem`.Yves Senn2014-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | While running Sqlite3 memory tests I encountered the following error: ``` Finished in 69.416366s, 58.0267 runs/s, 162.3681 assertions/s. 1) Error: ActiveRecord::Migration::ChangeSchemaTest#test_add_column_with_timestamp_type: NoMethodError: undefined method `type' for nil:NilClass /Users/senny/Projects/rails/activerecord/test/cases/migration/change_schema_test.rb:244:in `test_add_column_with_timestamp_type' 4028 runs, 11271 assertions, 0 failures, 1 errors, 1 skips ``` This was because the table `testings` was used in multiple test-cases. This resulted in a wrongly cached schema on `ActiveRecord::Base.schema_chae`. /cc @zuhao
* Remove :timestamp column typeSean Griffin2014-05-191-0/+17
| | | | | | | | | | | | The `:timestamp` type for columns is unused. All database adapters treat them as the same database type. All code in `ActiveRecord` which changes its behavior based on the column's type acts the same in both cases. However, when the type is passed to code that checks for the `:datetime` type, but not `:timestamp` (such as XML serialization), the result is unexpected behavior. Existing schema definitions will continue to work, and the `timestamp` type is transparently aliased to `datetime`.
* Remove dead test code for unsupported adaptersSean Griffin2014-05-171-10/+3
|
* Use teardown helper method.Guo Xiang Tan2014-03-141-2/+1
| | | | | | | | 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.
* make `change_column_null` reversible. Closes #13576.Yves Senn2014-01-081-0/+16
| | | | Closes #13623.
* Don't skip tests if we don't need to.Rafael Mendonça França2013-11-081-22/+14
| | | | | | | We can conditional define the tests depending on the adapter or connection. Lets keep the skip for fail tests that need to be fixed.
* Fixes #10432 add_column not creating array columns in PostgreSQLAdam Anderson2013-06-041-0/+29
| | | | | | When then PostgreSQL visitor was [added](https://github.com/rails/rails/commit/6b7fdf3bf3675a14eae74acc5241089308153a34) `add_column` was no longer receiving the column options directly. This caused the options to be lost along the way.
* Fix class and method name typosVipul A M2013-05-121-1/+1
|
* Remove extra sort from testVipul A M2013-01-211-3/+3
| | | | Cleanup change_schema tests to remove extra sorts on columns.
* Standardize the use of current_adapter?Rafael Mendonça França2013-01-011-2/+2
|
* Alias refute methods to assert_not and perfer assert_not on testsRafael Mendonça França2012-12-311-7/+7
|
* raise `ArgumentError` when redefining the primary key column. Closes #6378Yves Senn2012-10-281-0/+20
|
* Cleanup trailing whitespacesdfens2012-10-121-1/+1
|
* revert Default timestamps to non-nullDave Kroondyk2012-07-181-2/+2
| | | | | | | Commit 3dbedd2 added NOT NULL constraints to timestamps. Commit fcef728 started to revert this, but was incomplete. With this commit, 3dbedd2 should be fully reverted and timestamps will no longer default to NOT NULL.
* Add more options to column_exists? methodAleksey Magusev2012-06-301-6/+12
| | | | Also fix failures in check options for nil
* Integer limit out of range should be allowed to raise. Closes #6272Erich Menge2012-05-161-4/+0
|
* Add `create_join_table` migration helper to create HABTM join tablesRafael Mendonça França2012-01-271-1/+0
|
* move another index related test caseAaron Patterson2012-01-131-70/+0
|
* move tests regarding index modification to their own classAaron Patterson2012-01-131-84/+0
|
* decoupling more tests from AR::BaseAaron Patterson2012-01-131-0/+45
|
* move more schema modification testsAaron Patterson2012-01-131-0/+70
|
* move column ordering tests to it's own classAaron Patterson2012-01-101-46/+0
|
* refactoring migration testAaron Patterson2012-01-101-0/+414