A PostgreSQL backend for Refile.
- You want to store all your data in one place to simplify backups and replication
- ACID
- Gem is developed and tested using Postgresql 9.3, Ruby 2.1 and ActiveRecord 4.x. It might work with earlier versions.
- Performance hit storing files in database
- Higher memory requirements for database
- Backups can take significantly longer
Add this line to your application's Gemfile:
gem 'refile-postgres'
And then execute:
$ bundle
Or install it yourself as:
$ gem install refile-postgres
Generate migration for table were to store list of attachments.
$ rails g refile:postgres:migration
Run the migrations
$ rake db:migrate
Generate initializer and set Refile::Postgres as store
backend.
$ rails g refile:postgres:initializer
- Fork it ( https://github.com/krists/refile-postgres/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request