diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-11-30 10:06:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 10:06:02 -0500 |
commit | f6e1061c915a92389fee2819d29b13764942c985 (patch) | |
tree | 30f91b6801492c0e040b76ee330f53b3e4b957e4 /activerecord/CHANGELOG.md | |
parent | 5c6316dbb88075e27169f49a22e59357efd1a967 (diff) | |
parent | f39d72d5267baed1000932831cda98503d1e1047 (diff) | |
download | rails-f6e1061c915a92389fee2819d29b13764942c985.tar.gz rails-f6e1061c915a92389fee2819d29b13764942c985.tar.bz2 rails-f6e1061c915a92389fee2819d29b13764942c985.zip |
Merge pull request #34505 from eileencodes/add-readonly-mode
Add ability to block writes to a database
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 5b07d63684..d9488bd0f0 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,19 @@ +* Add the ability to prevent writes to a database for the duration of a block. + + Allows the application to prevent writes to a database. This can be useful when + you're building out multiple databases and want to make sure you're not sending + writes when you want a read. + + If `while_preventing_writes` is called and the query is considered a write + query the database will raise an exception regardless of whether the database + user is able to write. + + This is not meant to be a catch-all for write queries but rather a way to enforce + read-only queries without opening a second connection. One purpose of this is to + catch accidental writes, not all writes. + + *Eileen M. Uchitelle* + * Allow aliased attributes to be used in `#update_columns` and `#update`. *Gannon McGibbon* |