Database
Manage PocketBase collections and records in V2 Cloud.
The Database section lets you view and manage collections (tables) and records for your app.
Collections
Each app project uses prefixed collection names (p_{projectId}_logical_name). The AI creates collections when you ask for backend features:
- Field types: text, number, bool, date, relation, file, etc.
- Access rules — who can list, view, create, update, delete
- Indexes and validation
AI schema changes
In chat, describe data models:
The AI emits schema actions applied via the PocketBase admin API.
Data management UI
In V2 Cloud → Database you can:
- Browse collections
- View, create, edit, and delete records
- Inspect field values and relations
Use this for debugging, seeding test data, or manual fixes.
Access rules
Every collection should have explicit rules. Example patterns:
| Pattern | Rule intent |
|---|---|
| User-owned rows | @request.auth.id = user.id |
| Public read | @request.auth.id != "" or open list rule |
| Admin only | Restrict create/update to authenticated roles |
The AI includes rules when creating schemas. Review them in the dashboard or ask the AI to tighten security.
Local-first vs. database
| Approach | Use when |
|---|---|
| AsyncStorage | Single-device, offline, no accounts |
| V2 Cloud Database | Accounts, sync, shared data |
