aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Changed the call to .sort.last to .max when computing the migration version. Youwangjohn2013-03-191-1/+1
| | | | | do not actually need to sort everything (incurs more cost than just a simple max).
* Preserve magic comments and content encoding of copied migrations.OZAWA Sakuro2013-03-091-3/+12
| | | | | During insertion of "# This migration comes from ... " comment at the beginning of a migration, presence of magic comment was not considered.
* Fix changelog indent, remove self from method call in changelog/doc examplesCarlos Antonio da Silva2013-03-081-1/+2
| | | | [ci skip]
* transactions can be turned off per Migration.Yves Senn2013-03-051-7/+37
| | | | | | | | | | | Closes #9483. There are SQL Queries that can't run inside a transaction. Since the Migrator used to wrap all Migrations inside a transaction there was no way to run these queries within a migration. This patch adds `self.disable_ddl_transaction!` to the migration to turn transactions off when necessary.
* Use `silence` instead of `quietly` to silence the `CheckPending` middleware.Lucas Mazza2013-01-261-1/+1
| | | | | | | | `Kernel.quietly` silences `STDOUT` and `STDERR`, which is useless if the logger is writing to a file, while `AS::Logger#silence` swaps the logger level to `ERROR`. Related to #8820 and #8052.
* Fixes for PR [#8267]Marc-Andre Lafortune2012-12-221-1/+10
| | | | | | | | * Fix Migration#reversible by not using `transaction`. * Adapt mysql adapter to updated api for remove_column * Update test after aedcd683684d08eaf30623a4b48ce31a31426372
* Correctly shows RAILS_ENV=development even when ENV['RAILS_ENV'] is not set ↵Andy Lindeman2012-12-211-1/+1
| | | | | | (e.g., in Pow) * Fixes #8025
* Add Migration#reversible for reversible data operations [#8267]Marc-Andre Lafortune2012-12-211-0/+41
|
* Allow revert of whole migration [#8267]Marc-Andre Lafortune2012-12-211-3/+39
|
* Extract exec_migration [#8267]Marc-Andre Lafortune2012-12-211-11/+16
|
* Allow reverting of migration commands with Migration#revert [#8267]Marc-Andre Lafortune2012-12-211-25/+45
|
* recognize migrations, in folders containing numbers and 'rb'.Yves Senn2012-12-131-1/+1
| | | | Closes #8492
* Move to the schema-migrations-metadata branch.Jeremy Kemper2012-12-091-17/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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 metadata to schema_migrationsJosh Susser2012-12-011-7/+17
| | | | | migrated_at: timestamp when migration run fingerprint: md5 hash of migration source name: filename without version or extension
* stop raising so many exceptionsAaron Patterson2012-11-071-1/+5
|