aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/migration.rb
Commit message (Collapse)AuthorAgeFilesLines
* Back to fetching all versions in ruby instead of letting SQL do it as it's ↵Tarmo Tänav2008-08-261-5/+6
| | | | | | difficult to get all databases to convert the text value to a number with the same SQL Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Use DECIMAL instead of INTEGER when casting as mysql doesn't work with just ↵Tarmo Tänav2008-08-251-3/+8
| | | | | | | | "INTEGER" and other databases don't like "UNSIGNED" which mysql requires And don't mask exceptions. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Cache migrated versions list in Migrator and use it to fetch the latest ↵Tarmo Tänav2008-08-251-6/+8
| | | | | | | | | | | | migrated version name [#845 state:resolved] Also optimized Migrator#current_version class method to fetch only the latest version number and not all of them. With this change no matter how many migrations there are the schema_migrations table is only SELECTed from once. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Made migrations transactional for PostgreSQL [#834 state:resolved]Tarmo Tänav2008-08-221-4/+21
| | | | Patch originally from http://dev.rubyonrails.org/ticket/5470
* Added MigrationProxy to defer loading of Migration classes until they are ↵Nik Wakelin2008-08-061-6/+26
| | | | | | | actually required by the migrator Signed-off-by: Michael Koziarski <michael@koziarski.com> [#747 state:resolved]
* Set config.active_record.timestamped_migrations = false to have migrations ↵Nik Wakelin2008-07-171-0/+16
| | | | | | with numeric prefix instead of UTC timestamp. [#446 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* ActiveRecord::Migrator#run records version-state after migrating. [#369 ↵Michael Raidel2008-06-221-1/+4
| | | | state:resolved]
* Merge docrails.Pratik Naik2008-05-251-2/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Added protection against duplicate migration names (Aslak Hellesøy) [#112 ↵Aslak Hellesøy2008-05-111-0/+10
| | | | state:resolved]
* Improve documentation coverage and markupXavier Noria2008-05-021-4/+4
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix migrations when migrating to a specified version number with a fresh ↵Ian White2008-04-171-2/+4
| | | | | | database [#1 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add support for interleaving migrations by storing which migrations have run ↵Rick Olson2008-04-091-29/+54
| | | | | | 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
* Fix new migration versionsDavid Heinemeier Hansson2008-03-281-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Switched to UTC-timebased version numbers for migrations and the schema. ↵David Heinemeier Hansson2008-03-281-61/+87
| | | | | | This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches (closes #11458) [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9122 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation.Pratik Naik2008-03-261-2/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: fix warnings, shadowed block vars, and unitialized instance ↵Jeremy Kemper2007-12-221-5/+4
| | | | | | vars git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* The test task stops with a warning if you have pending migrations. Closes ↵Jeremy Kemper2007-12-061-0/+4
| | | | | | #10377. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve documentation for IrreversibleMigrations. Closes #9636 [toolmantim]Michael Koziarski2007-11-111-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]Marcel Molina2007-11-081-6/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update add_index documentation to use new options api. Closes #9787 [kamal]Marcel Molina2007-10-261-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8031 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise an intelligible error message when migration aren't named correctly ↵Michael Koziarski2007-10-171-1/+9
| | | | | | [bronson] Closes #9909 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7957 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change Migration documentation to use the new syntax. Closes #9813 [sjgman9]Michael Koziarski2007-10-081-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that using version-targetted migrates would fail on loggers other than ↵David Heinemeier Hansson2007-09-221-1/+5
| | | | | | the default one (closes #7430) [valeksenko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7577 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Docfix (closes #7593) [tarmo]David Heinemeier Hansson2007-09-221-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: report the number of rows affected when calling insert, update, ↵Jeremy Kemper2007-06-051-0/+1
| | | | | | delete, etc. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Announce migration versions as they're performed.Jeremy Kemper2007-05-261-35/+41
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migration benchmark wrappers use alias_method_chain. Closes #6456.Jeremy Kemper2006-11-191-5/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document other options available to migration's add_column. #6419Marcel Molina2006-10-221-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5333 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* improve example in migrations docs, closes #6370Jeremy Kemper2006-10-091-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Migrations: gracefully handle missing migration files. Closes #5857.Jeremy Kemper2006-08-231-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4809 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix announcement of very long migration names. Closes #5722.Jeremy Kemper2006-08-051-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4704@asus: jeremy | 2006-06-27 12:00:19 -0700Jeremy Kemper2006-07-081-2/+3
| | | | | | | | | | | | | | | decimal r4705@asus: jeremy | 2006-06-27 12:20:47 -0700 current_adapter? checks whether any of its arguments is the name of the current adapter class r4834@asus: jeremy | 2006-07-08 13:08:24 -0700 Room to float. r4835@asus: jeremy | 2006-07-08 13:09:18 -0700 Give lock test a few chances. r4836@asus: jeremy | 2006-07-08 13:12:05 -0700 Numeric and decimal columns map to BigDecimal instead of Float. Those with scale 0 map to Integer. Closes #5454. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update inconsistent migrations documentation. Closes #4683. ↵Marcel Molina2006-04-221-2/+2
| | | | | | [machomagna@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Doc fix (closes #4521)David Heinemeier Hansson2006-04-011-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remember kiddies, Dir[] uses Dir#glob, not a RegexpRick Olson2006-03-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3970 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Only run migrations that look like migrationsDavid Heinemeier Hansson2006-03-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* StylingDavid Heinemeier Hansson2006-03-181-8/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3929 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Migration#execute would have the table name prefix appended to ↵David Heinemeier Hansson2006-03-181-1/+1
| | | | | | its query (closes #4110) [mark.imbriaco@pobox.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added migrations support to the Sybase adapter (closes #4293) [John R. Sheets]David Heinemeier Hansson2006-03-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add suppress_messages to migrations, to temporarily turn off verbose messagesJamis Buck2006-03-091-0/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make migrations verboseJamis Buck2006-03-041-5/+98
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3760 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix doc bugDavid Heinemeier Hansson2006-01-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3389 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Update documentation for Migrations. References #2861.Jeremy Kemper2005-11-141-13/+30
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that an DuplicateMigrationVersionError gets raised when multiple ↵Florian Weber2005-10-311-4/+17
| | | | | | migrations have the same version number. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add exception to example (closes #2315)David Heinemeier Hansson2005-10-261-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix docs (closes #2491)David Heinemeier Hansson2005-10-261-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make migrations honor table name prefixes and suffixes.Marcel Molina2005-09-261-2/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed migrations for Windows when using more than 10 [David Naseby]David Heinemeier Hansson2005-09-211-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2285 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improved migrations' behavior when the schema_info table is empty.Nicholas Seckar2005-09-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added dump of schema version to the db_structure_dump task for databases ↵David Heinemeier Hansson2005-09-121-1/+1
| | | | | | that support migrations #1835 [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de