Pushjet-Server-Api icon indicating copy to clipboard operation
Pushjet-Server-Api copied to clipboard

Support sqlite3 as a backend.

Open skorokithakis opened this issue 9 years ago • 4 comments

Sqlite3 is a very capable database, which would work very well with Pushjet and make it much easier to install. Since Pushjet already uses SQLalchemy, there's no reason it couldn't easily support that backend. What's currently preventing sqlite3 from being used?

skorokithakis avatar Aug 27 '16 11:08 skorokithakis

It looks like the only thing preventing this is the database.sql file, which could presumably be written using the ORM instead, and would support any database backend SQLalchemy supports.

skorokithakis avatar Aug 27 '16 11:08 skorokithakis

SQLAlchemy supports SQLite but right now I'm using two MySQL specific datatypes. I'll remove those to make sure that the database back-end can be anything SQLAlchemy supports.

Example: https://github.com/Pushjet/Pushjet-Server-Api/blob/163c511226e82bd9a9fb54218e31cb8f28f1d4cc/models/message.py#L3

Mechazawa avatar Aug 27 '16 13:08 Mechazawa

That'd be great, thank you. For 99% of custom server deployments, SQLite will be ideal, since most people won't need to service many requests per second.

skorokithakis avatar Aug 27 '16 13:08 skorokithakis

I'll make custom deployments a lot less painful while I'm at it.

Mechazawa avatar Aug 27 '16 13:08 Mechazawa