diff options
author | Carl Brasic <677224+brasic@users.noreply.github.com> | 2018-06-27 22:01:58 -0500 |
---|---|---|
committer | Carl Brasic <677224+brasic@users.noreply.github.com> | 2018-07-02 12:14:46 -0500 |
commit | bf1024de5500f3c8d2c3b1876894feb02ba26ea7 (patch) | |
tree | e24951c30448eecb22e3d7da92410193d404d64a /version.rb | |
parent | 02aac286a6bd8db0eeb606d639c7a7e78ac01453 (diff) | |
download | rails-bf1024de5500f3c8d2c3b1876894feb02ba26ea7.tar.gz rails-bf1024de5500f3c8d2c3b1876894feb02ba26ea7.tar.bz2 rails-bf1024de5500f3c8d2c3b1876894feb02ba26ea7.zip |
Support readonly option in SQLite3Adapter
Readonly sqlite database files are very useful as a data format for
storing configuration/lookup data that is too complicated for YAML
files. But since such files would typically be committed to a source
control repository, it's important to ensure that they are truly safe
from being inadvertently modified. Unfortunately using unix permissions
isn't enough, as sqlite will "helpfully" add the write bit to a database
file whenever it's written to.
sqlite3-ruby has supported a `:readonly` option since version 1.3.2 (see
https://github.com/sparklemotion/sqlite3-ruby/commit/c20c9f5dd2990042)
This simply passes that option through to the adapter if present in the
config hash. I think this is best considered an adapter-specific option
since no other supported database has an identical concept.
Diffstat (limited to 'version.rb')
0 files changed, 0 insertions, 0 deletions