aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/ar_schema_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* `ActiveRecord::SchemaMigration` has no primary key.Yves Senn2014-06-061-0/+14
| | | | | | | | | | Before this patch, using `ActiveRecord::Base.primary_key_prefix_type` with `:table_name_with_underscore` would change the `SchemaMigration` model to have a primary key. This resulted in broken queries for PG because it tried to return the inserted PK (which does not exist). Closes #15051. Closes #15419.
* test refactor, don't hardcode default for `table_name_prefix`.Yves Senn2014-06-061-1/+2
|
* `bin/rake db:migrate:status` works with legacy migration numbers.Yves Senn2014-06-061-0/+7
| | | | | | | The migration numbers were normalized different ways. This left the task output in an inconsistent state. Closes #15538.
* Use teardown helper method.Guo Xiang Tan2014-03-141-1/+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.
* Call assume_migrated_upto_version on connectionKyle Stevens2013-05-111-0/+20
| | | | | | | | | | | Call assume_migrated_upto_version on connection to prevent it from first being picked up in method_missing. In the base class, Migration, method_missing expects the argument to be a table name, and calls proper_table_name on the arguments before sending to connection. If table_name_prefix or table_name_suffix is used, the schema version changes to prefix_version_suffix, breaking `rake test:prepare`. Fixes #10411.
* Reset SchemaMigration after updatingAkira Matsuda2013-01-221-0/+1
|
* Needs to reset SchemaMigration first, or the tests fail in sqlite3Akira Matsuda2013-01-071-1/+1
|
* Move to the schema-migrations-metadata branch.Jeremy Kemper2012-12-091-51/+0
| | | | | | | | | | | | | | | | | | | | | | | | Pending work on graceful app upgrades. Revert "Merge pull request #8439 from joshsusser/fixes" This reverts commit ce8ac39338f86388e70356b3a470b3ea443802ae, reversing changes made to b0e7b6f67c984d4b1502e801781ed75fad681633. Revert "Merge pull request #8431 from joshsusser/schemadump" This reverts commit 036d3e1c2b65c4b8cbd23de2e20ad67b9b756182, reversing changes made to 0c692f4d121792117b6a71e5ed590a31c3b9d12e. Revert "Merge branch 'joshsusser-master' into merge" This reverts commit 0c692f4d121792117b6a71e5ed590a31c3b9d12e, reversing changes made to 2e299fca715b083a60222a85e48f9d3b8dd8ce93. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb activerecord/test/cases/schema_dumper_test.rb
* Add migration history to schema.rb dumpJosh Susser2012-12-021-0/+51
|
* Call methods on the correct instance in AR::Schema.defineJohn Firebaugh2012-05-161-0/+7
| | | | | Now that migrations support instance methods, we should use the same instance rather than relying on delegation to a global instance. This allows subclassing AR::Schema.
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-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.
* fixing typoNeeraj Singh2010-07-181-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* ActiveRecord should raise an error on invalid migration types.José Valim2010-02-281-0/+10
|
* Autoload ActiveRecord filesJoshua Peek2008-11-241-1/+0
|
* Add support for interleaving migrations by storing which migrations have run ↵Rick Olson2008-04-091-2/+2
| | | | | | in the new schema_migrations table. Closes #11493 [jordi] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move tests to casesJeremy Kemper2008-01-181-0/+33
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de