final-hill / cathedral

Requirements Engineering
GNU Affero General Public License v3.0
0 stars 0 forks source link

Migrate from pglite to sqlite #189

Open mlhaufe opened 6 days ago

mlhaufe commented 6 days ago
  1. pglite is still too new to rely upon (alpha status).
  2. It has many SQL bugs that are unacceptable such as ALTER statements not working
  3. The promise of local-first and syncing via CRDTs is attractive but there is still a server required as a coordinator. This is not a cooperative model.
  4. SQL Databases have a closed world assumption in their architecture that prevent many constraints from being utilized at the astonishment of users. other unsupported features listed here: https://electric-sql.com/docs/usage/data-modelling

Note that table inheritance will be lost with this migration.

This should enable usage of TypeORM: https://github.com/search?q=typeorm+wa-sqlite&type=code

Open question: is a server now required for TypeORM to work? I don't think a connection string to indexDB is possible for example.

If so, the Azure App Service Free plan should with an embedded Sqlite database