aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ci skip] Fix comment, since Rails 3.1 is outclaudiob2015-05-111-2/+1
|
* Fix typo [ci skip]Luke Hutscal2015-02-231-1/+1
| | | | I think this was supposed to be "roundTrip".
* fix column name in migration example [ci skip]Daniël de Vries2015-02-191-1/+1
|
* Do not check only for the Rails constantRafael Mendonça França2015-01-021-1/+1
| | | | | This constant may be define for auxiliar gems like rails-html-sanitizer and these methods call will fail.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* bring back `db:test:prepare`.Yves Senn2014-11-251-1/+8
| | | | | | | | | | | | | | | This reverts deprecations added in #13528. The task is brought back for two reasons: 1. Give plugins a way to hook into the test database initialization process 2. Give the user a way to force a test database synchronization While `test:prepare` is still a dependency of every test task, `db:test:prepare` no longer hooks into it. This means that `test:prepare` runs before the schema is synchronized. Plugins, which insert data can now hook into `db:test:prepare`. The automatic schema maintenance can't detect when a migration is rolled-back, modified and reapplied. In this case the user has to fall back to `db:test:prepare` to force the synchronization to happen.
* cleanup, remove trailing whitespace [ci skip]Yves Senn2014-11-241-2/+2
|
* Don't attempt to load the schema file in tests if none existsSean Griffin2014-10-311-1/+1
|
* Load test schema even if there are no migrationsSean Griffin2014-10-311-1/+5
| | | | Fixes #17170
* [ci skip] add doc for STEP in migrationAditya Kapoor2014-08-211-3/+6
|
* [ci skip] correct docs about the migration generationAditya Kapoor2014-08-211-9/+2
|
* Correctly determine if migration is needed.Jeremy McNevin2014-08-131-9/+8
| | | | | | | This method would assume that if last migration in the migrations directory matched the current schema version, that the database was up to date, but this does not account for new migrations with older timestamps that may be pending.
* schema rake tasks are specific about the configuration to act on.Yves Senn2014-08-061-1/+1
| | | | | | | | | | The rake tasks and the `DatabaseTakss` adapter classes used to assume a configuration at some places. This forced the rake tasks to establish a specific connection before calling into `load_schema`. After #15394 this started to cause issues because it could `purge` the wrong database before loading the schema.
* Remove redundant `self.` in class method callsJack Danger Canty2014-07-301-5/+5
| | | | These are the only instances of this in the whole code base.
* do not hold on to a stale connection object. fixes #15998Aaron Patterson2014-07-011-4/+9
|
* fk: dump foreign keys to schema.rbYves Senn2014-06-261-1/+3
| | | | respect `table_name_prefix` and `table_name_suffix`.
* Merge pull request #13963 from lucas-clemente/pending_migrationsRafael Mendonça França2014-06-161-5/+8
|\ | | | | Skip migration check if adapter doesn't support it
| * skip migration check if adapter doesn't support itLucas Clemente2014-04-191-5/+8
| |
* | `bin/rake db:migrate:status` works with legacy migration numbers.Yves Senn2014-06-061-1/+1
| | | | | | | | | | | | | | The migration numbers were normalized different ways. This left the task output in an inconsistent state. Closes #15538.
* | Remove deprecated method ActiveRecord::Migrator.proper_table_nameAkshay Vishnoi2014-06-051-13/+0
| |
* | Merge pull request #10798 from ↵Rafael Mendonça França2014-05-191-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | jcxplorer/fix-enable_extension-with-table_name_prefix Fix migrations that use enable_extension with table_name_prefix/suffix Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/migration.rb
| * | Fix migrations with enable_extensionJoao Carlos2013-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | When using ActiveRecord::Base.table_name_prefix and/or table_name_suffix, extension names got the same treatment as table names when running migrations. This led to migrations that tried to call, for example, enable_extension("prefix_hstore") on the connection.
* | | Remove dead test code for unsupported adaptersSean Griffin2014-05-171-1/+1
| |/ |/|
* | adding missed changekayvan2014-02-111-1/+1
| |
* | adding connection parameter to check_pending for migrationskayvan2014-02-111-5/+5
| |
* | activerecord: Initialize Migration with version from MigrationProxy.Dylan Thacker-Smith2014-01-061-1/+1
| |
* | Automatically maintain test database schemaJon Leighton2014-01-021-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move check from generated helper to test_help.rb, so that all applications can benefit * Rather than just raising when the test schema has pending migrations, try to load in the schema and only raise if there are pending migrations afterwards * Opt out of the check by setting config.active_record.maintain_test_schema = false * Deprecate db:test:* tasks. The test helper is now fully responsible for maintaining the test schema, so we don't need rake tasks for this. This is also a speed improvement since we're no longer reloading the test database on every call to "rake test".
* | ActiveRecord migration exception message formattingJohn Joseph Bachir2013-12-031-8/+15
| |
* | Remove deprecated cattr_* requiresGenadi Samokovarov2013-12-031-1/+1
| |
* | Use `SchemaStatements#initialize_schema_migrations_table` instead of ↵Ryuta Kamizono2013-11-201-1/+1
| | | | | | | | `ActiveRecord::SchemaMigration.create_table`.
* | Refer to Rails.env only when Rails is definedAkira Matsuda2013-11-111-1/+5
| |
* | Warnings removed for ruby trunkArun Agrawal2013-11-011-1/+1
| | | | | | Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
* | Fix migration docs to use new remove_column semanticsPaul Nikitochkin2013-10-251-2/+2
| | | | | | | | Fixes: #12640
* | Changing deprecation_horizon to be Rails 4.2wangjohn2013-08-241-1/+1
| | | | | | | | | | Also, +ActiveRecord::Migrator.proper_table_name+ should actually have a deprecation horizon of Rails 4.2 (not 4.1).
* | Making proper_table_name take in options.wangjohn2013-08-221-18/+40
| | | | | | | | | | | | | | | | | | | | | | The options will specify the prefix and the suffix. Also, I'm moving the method to be an instance method on the +Migration+ instance. This makes more sense than being a class method on the +Migrator+ class because the only place that uses it is on a +Migration+ instance (in a method_missing hook). The logic for the Migrator shouldn't be doing any work to calculate the table name, it should be the Migration itself. Also made some small indentation fixes.
* | Avoid "uninitialized constant ActiveRecord::PendingMigrationError::Rails"Akira Matsuda2013-07-291-1/+1
| |
* | rake -> bin/rakeSteve Klabnik2013-07-241-1/+1
| |
* | remove leftover if after deprecation removal (68563128).Yves Senn2013-07-041-4/+1
| |
* | Remove deprecated block filter from `ActiveRecord::Migrator#migrate`.Yves Senn2013-07-041-9/+1
| |
* | Remove deprecated String constructor from `ActiveRecord::Migrator`.Yves Senn2013-07-041-3/+0
| |
* | Fix Build. Changing constructor.Arun Agrawal2013-06-051-3/+3
| |
* | only check pending migrations if there are new filesAaron Patterson2013-06-051-2/+25
| |
* | Fix #10789. Now at last ::Logger doesn't support #silence method .kennyj2013-06-051-3/+1
|/
* copy edits [ci skip]Vijay Dev2013-05-121-5/+1
|
* Added documentation for ActiveRecord::Base#next_migration_numberaditya-kapoor2013-05-091-0/+5
|
* Remove code duplicationNeeraj Singh2013-04-241-8/+9
|
* Improve the error messageRafael Mendonça França2013-04-191-1/+1
|
* Support transactions in Migrator.runbondarev2013-04-181-5/+12
|
* mark ReversibleBlockHelper as :nodoc: [ci skip]Francesco Rodriguez2013-04-041-1/+1
|
* Fixed typos in activerecordPrathamesh Sonpatki2013-03-271-1/+1
|