Switch to Turso for the backend database #18
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using Turso will allow for created branched databases for each pull request, and local development should be easier since it just uses sqlite.
The branched databases will be named based on the branch name and id/number for the pull request, this will make it possible for the site to automatically use the branched database just using existing environment variables, instead of needing to build on GH:A in order to set new environment variables before deployment.
The branched database will be automatically deleted when the PR is merged or closed, in order to prevent build-up of databases filling up our Turso limits. Unfortunately this does mean that we won't be able to go back to old preview deployments without manually creating the branched database again. This is a suitable compromise though, since for old previews the main database may no longer be compatible with the migrations that would be performed, so the DB would probably need to be created manually anyway in that case