diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-03-01 11:39:39 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-03-05 16:12:08 +0100 |
commit | b337390889cb4a9f80ed08daf072a043f0e7ddf3 (patch) | |
tree | 896987ee08707fd2c09579bc9f0732674a9ba53d /activerecord/CHANGELOG.md | |
parent | f1241ef959a45d1b66e2e9399a3e1b09cf95cc2c (diff) | |
download | rails-b337390889cb4a9f80ed08daf072a043f0e7ddf3.tar.gz rails-b337390889cb4a9f80ed08daf072a043f0e7ddf3.tar.bz2 rails-b337390889cb4a9f80ed08daf072a043f0e7ddf3.zip |
transactions can be turned off per Migration.
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.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 97616ffc58..a0ca36788d 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,20 @@ ## Rails 4.0.0 (unreleased) ## +* Make it possible to execute migrations without a transaction even + if the database adapter supports DDL transactions. + Fixes #9483. + + Example: + + class ChangeEnum < ActiveRecord::Migration + self.disable_ddl_transaction! + def up + execute "ALTER TYPE model_size ADD VALUE 'new_value'" + end + end + + *Yves Senn* + * Assigning "0.0" to a nullable numeric column does not make it dirty. Fix #9034. |