Your database
Last reviewed:
Use a database to store accounts, orders, or bookings. Explain to Codey what needs to persist and set up the database from the Database tool.
Set up the project database
- 1
Open Database
In the workspace, click +, then Database. If the service is marked as awaiting activation, it is not currently ready for your account.
- 2
Create the database
Click Create database and wait for Your database is ready. The interface suggests a few seconds, but service conditions can make it longer. You do not need to copy a connection URL.
- 3
Request the data and features
Return to chat and describe what to store and display. Review and execute the plan, then test saving in Preview. Retry from the database panel if provisioning fails.
Browse data
- 1
Open Data
From + choose Data, then Tables. Select a table and use Previous and Next to browse rows.
- 2
Handle an empty state
If no database exists, set it up first. If no tables exist, ask Codey to create the required structure. If the database is sleeping, click Wake database and wait a few seconds, then reload if needed.
Query editor
- 1
Review the query
Open SQL in the Data tool if you know the query you need. It targets the development database. Check what it will read or change before running it.
- 2
Run it and read the result
Click Run and wait for a result or error. Only part of the rows may be displayed because of the display limit. Correct a failed query; do not repeat a mutation before checking what executed.
The SQL editor is not read-only. Insert, update, and delete commands can change development data directly. Saved snapshots in Database cover production data; do not rely on them to undo development-data changes.
For a platform-provisioned database, preview and development data are separate from published production data. Check which environment you are testing, especially after migration or connecting external services.