TotalApp Docs

Database Settings

Choose where Data Lab reads your workspace data from and keep the Cloudflare D1 copy up to date.

Overview

The Database tab in Settings has one choice for the whole workspace, not one per module. Your records stay where they always were, as files on the server’s disk. The choice decides where Data Lab looks when it answers a question.

Everyone in the workspace can see the tab; only workspace admins can change it.

Storage backend

OptionWhat it does
Local (Render disk)The default. Data Lab reads your current data from the server for every question and forgets it again afterwards. Nothing is copied anywhere.
Cloudflare (D1)Data Lab answers from your workspace’s copy in a Cloudflare D1 database. Only your own rows are ever read. Available once your platform administrator has connected Cloudflare D1 on the server; otherwise you are told that it is not set up yet and the workspace stays on Local.

Your data is not moved

Choosing Cloudflare does not move your records. They stay on the server as the original, and the D1 copy is a one-way read copy used by Data Lab. All other screens keep using the server as before.

Sync to D1

The Sync to D1 button copies the Data Lab tables of your workspace (sales, purchasing, finance and CRM) into the shared Cloudflare D1 database, tagged with your workspace id. Run it again at any time to refresh the copy. The line below the button shows when the last sync ran and how many rows in how many tables it copied. Only workspace admins can run it.

Tip

Load the sample data of the modules first. A sync of an empty workspace copies 0 rows.

Keep the D1 copy up to date automatically

When this switch is on (the default), Data Lab checks before it answers whether any table changed since the last sync and copies only the tables that changed. The first question after a change can therefore take a little longer. Switch it off if you prefer to refresh the copy yourself with Sync to D1; Data Lab then shows a note that your data changed since the copy was made.

FAQ

The Cloudflare option says it is not set up.
Cloudflare D1 has to be connected on the server by your platform administrator first. Until then the workspace stays on Local, which works fully.
Is my data shared with other companies in D1?
The database is shared, but every row is tagged with your workspace id and every Data Lab query is locked to that id on the server, so other workspaces’ rows can never be read through your questions.