This page covers the operational side of data stores: how an app actually gets access to one, what the different access levels mean, how to route each environment to a different branch, and how to browse and edit the data directly from the dashboard. If you haven’t read Overview yet, start there—it explains what a data store is and when to reach for one. For rolling back changes, see History & rewind.Documentation Index
Fetch the complete documentation index at: https://docs.stardeck.ai/llms.txt
Use this file to discover all available pages before exploring further.
Connecting a store to an app
An app can’t use a data store until you explicitly connect it.- Open your app and go to Settings
- Scroll to the Data Stores section
- Click Connect
- Pick the data store and choose an access level
Access levels
| Level | What the app can do |
|---|---|
| Read | Query data only—no additions, edits, or deletions |
| Write | Add, edit, and delete rows, but can’t change the schema |
| Admin | Full control, including creating and altering tables |
If your app was created before data stores existed, you’ll see its built-in database listed
here with Admin access. It’s always connected and can’t be disconnected—this is the legacy
per-app database. New apps won’t have this entry.
Branches and environment routing
This is the most important concept to understand, so take a minute with it. A database store can have multiple branches—think of them as independent copies of your data, similar to git branches for code. Each branch has its own tables and its own rows. Changes on one branch never touch another. When you connect a database store to an app, you decide which branch each environment reads from. Open Settings → Data Stores and you’ll see a Branch routing panel under each connected database store, with three dropdowns:| Environment | Example branch | What it means |
|---|---|---|
| Production | main | Real customers touch this data |
| Preview | main | Client-facing previews share production data |
| Sandbox | dev | Safe to experiment—agent changes land here |
What happens when you change routing
- Sandbox — your sandbox restarts automatically so the new branch takes effect immediately
- Preview and Production — the change takes effect on your next deploy
Browsing and editing data
For database stores, the dashboard gives you a full view of your tables without touching any code.- Go to Dashboard → Data Stores → [your store]
- Use the branch picker at the top to choose which branch you’re viewing
- The left sidebar lists every table—click one to open it
- Create tables and columns with rich field types: text, number, date, boolean, select, multi-select, url, email, phone, currency, rating, relation, file reference, and JSON
- Sort by any column
- Filter rows with conditions like “equals”, “contains”, “is null”
- Insert, edit, and delete rows individually
- Paginate through large tables
When you delete a table from the dashboard, Stardeck soft-deletes it—the table is renamed and
hidden rather than dropped. If you ever delete something by mistake, reach out to support and
we can recover it.
Storage stores
Storage stores work a little differently because they hold files rather than rows.- Go to Dashboard → Data Stores → [your storage store]
- You’ll see a folder tree on the left and a file list on the right
- Drag and drop files to upload them, create folders with New Folder, and click a file to open its detail panel with a download link
- Select files with the checkboxes and click Delete to remove them
Storage stores don’t have branches. Every environment connected to a storage store sees the same
files. If you need environment-isolated files, use separate storage stores.
Promoting an app database to an org-level store
Every app that uses Neon has its built-in databases (production and sandbox) automatically wrapped as data stores so you can browse them from the dashboard. By default these are owned by their app — they’re listed withadmin access in the app’s data store settings, they can’t be disconnected, and they’re deleted along with the app.
If an app’s database has grown into something more than one app should be able to read, you can promote it from the data store’s settings page. Click Promote in the header next to the Branches and Rewind buttons, type the store name to confirm, and the wrapper becomes a real org-level data store.
After promotion:
- The originating app keeps a read connection via an explicit
data_store_connectionsentry. Bump it to write or admin from the app’s data store settings if you need to. - The originating app can no longer run schema migrations against this database. Schema changes become your responsibility from the data store dashboard.
- Deleting the originating app no longer deletes the underlying database. That’s the whole point — the data outlives the app that created it.
- Your app’s
DATABASE_URLreferences will need to be updated. The promoted store is injected under a new env var name. See the warning below for the rewrite. - You can connect any other app in your org to the promoted store from the app’s settings, just like any standalone store.
Find every reference toprocess.env.DATABASE_URLin this app and switch them toprocess.env.DATA_STORE_<MY_STORE_NAME>_URL(the env var name from my newly-promoted data store — check the data store dashboard for the exact name). Update the drizzle config, the db client, and any server-side code that reads it. Don’t touch references insidenode_modulesor generated migration files.
Production and sandbox are promoted independently — each is its own data store wrapper. Most
users only promote production; sandbox usually stays with the app so the agent can keep
running migrations against it freely.
Access for deployed apps
You don’t have to wire anything up manually. When you connect a data store to an app, Stardeck automatically makes the connection details available to your deployed app as environment variables. The agent uses them when it writes code that reads from or writes to the store, so you never need to copy a connection string. See Environment Variables for more on how environment variables work in Stardeck.Common scenarios
”I want my admin app and my customer app to share the same users”
Create a database store (e.g.shared-users), connect it to both apps, and give the admin app Admin access and the customer app Write access. Ask the agent to read and write users from the shared store instead of the built-in app database.
”I want to try a schema change without breaking production data”
Create a new branch on your database store—say,experiment. Point your sandbox at that branch in the Branch routing panel. Now the agent can add, remove, or rename tables in sandbox without touching the main branch that production reads from. When you’re ready, ask the agent to apply the same changes to main.