manyfold icon indicating copy to clipboard operation
manyfold copied to clipboard

SQLite support for database

Open sammcj opened this issue 2 years ago • 2 comments

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?

sammcj avatar Feb 01 '23 01:02 sammcj

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.

Floppy avatar Feb 02 '23 21:02 Floppy

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).

ksuquix avatar Feb 22 '23 15:02 ksuquix