manyfold
manyfold copied to clipboard
SQLite support for database
It would be great if there was an option to just use SQLite instead of running a full database server.
While I love PostgreSQL I think SQLite is more than performant enough, it's very lightweight and portable.
I see SQLite is already mentioned in this file - is there anything stopping someone from using it instead?
I've had the same request for MySQL in #665, and I think that given Rails gets everything (including the adapter) from DATABASE_URL
, there's a chance it might Just Work if you try a database url like sqlite3:path/to/some/permanent/storage/database.sqlite
. I've not tested it, but if you fancy having a go, the sqlite dependency should already be installed, so you never know. Worth a try!
I'll take a look as well when I can, but I don't know when that's likely to be.
The test harnesses use sqlite, so I see no reason for it to not work.
One warning though, I made one change in the "combined view" that initially worked with sqlite testing, but I had to tweak it to work with postgres because of restrictions postgres placed on joining stuff with .or() (you can see it in models_controller.rb).