jrie / sqstorage

A easy to use and quick way to organize your inventory, storages and storage areas
https://sqstorage.net
GNU General Public License v3.0
26 stars 18 forks source link

Support SQLite #32

Open n1trux opened 4 years ago

n1trux commented 4 years ago

I'd really like to run this on devices without a "fat" DB daemon, which is where SQLite would be beneficial.

wernersbacher commented 4 years ago

+1, it would make it really quick and easy. SQLite can handle websites with up to millions of request a day. So for a self hosted private service, SQLite should be strong enough.

jrie commented 4 years ago

I agree, it might be nice to have SQLite support - but at the moment, there are several database changes going on and possible coming and adding another database to work with, might be slowing down the development.

When things are more settled this is definitely something to look into.

n1trux commented 4 years ago

at the moment, there are several database changes going on and possible coming and adding another database to work with, might be slowing down the development.

Or you could use an abstraction layer which works with both.

I found Medoo on the lightweight-php list which "supports all SQL databases, including MySQL, MSSQL, SQLite, MariaDB, PostgreSQL, Sybase, Oracle and more".

Changes to the database scheme could be implemented by properly versioning the database (related: #34) and creating migrations. These could easily be written with Medoo if there's a mismatch between installed DB version and upgraded DB version.

schnoog commented 4 years ago

Would prefer to wait for https://github.com/SergeyTsalkov/meekrodb/issues/66 to keep the current wrapper syntax alive.