-
-
Notifications
You must be signed in to change notification settings - Fork 66
Configuring User Synchronizable Database
- Create account in Turso https://app.turso.tech/
- Create database group, name it how you like.
Fly.io is the most free one available, so we'd recommend choosing that.
Also select the database location to wherever closest to you for the best connection latency.
- Create database
Name it however you like and pick the group you just made in the earlier step
Do NOT enable "Schema Only"
- Copy the database URL by clicking on it. Paste it on the database URL field in Collapse settings
Do not worry about the URL protocol automatically changed from
libsql://
tohttps://
. It is done automatically by Collapse due to limitation in the library we used to connect to the database
- Press the three dots menu next to the database you created, then press Create Token
Set the expiration to
No expiration
and the access to beRead & Write
Note that sharing Database URL and its token to anyone else will give them FULL access to the database, including modifying and deleting your entire database. Be careful with it.
Paste the created token into Collapse setting field
- Create User ID
This user ID field is primarily used for those who wants to share their database with someone else but still have the data separated.
You can use any string combination or press the Generate UID to automatically generate it for you.
Do not ever lose this ID as you will not be able to access your data again without complicated database table moving.
- Validate the Settings
By pressing
Validate and Save
button, Collapse will try to verify the connection to the database and see if everything is good. If there is an error, it will be shown in a pop-up dialog and the settings won't be saved.