Classic mode overview
Classic mode is the original CloudBase environment type: an environment is made up of the document database, cloud storage, authentication, cloud functions, cloud hosting and other capabilities, each enabled and configured independently. Any environment created without choosing PostgreSQL runs in classic mode.
PG mode is available for new environments only, and existing classic-mode environments cannot be upgraded. For new projects, create a PG-mode environment — see PG mode overview.
Capabilities
| Capability | Description |
|---|---|
| Document database | Stores business data as documents; permissions are controlled by security rules (document-level expressions) |
| Cloud storage | The environment's built-in object storage; uploads return a fileID, and permissions are also controlled by security rules |
| Authentication | Multiple sign-in methods and user management — see Authentication overview |
| MySQL database | A relational database instance, enabled in the console and accessed through app.rdb() — see Initialization |
| Data models | Declarative data structure and permission definitions on top of the document database — see Data model overview |
| Cloud functions / Cloud hosting | Server-side compute — see Cloud functions and Cloud hosting |
Differences from PG mode
| Classic mode | PG mode | |
|---|---|---|
| Database | Document database (primary), MySQL optional | A PostgreSQL instance that exposes a RESTful API through PostgREST |
| Permissions | A separate security rules (JSON expression) set for the database and for cloud storage | Table-level GRANT plus row-level RLS — permissions are SQL |
| Cloud storage API | app.storage.from(), uploads return the full fileID | Uses native PostgreSQL buckets; path arguments are object names inside the bucket |
| Authentication data | Managed by the authentication service | Stored in the PostgreSQL auth schema, readable in SQL for the current user |
The document database works in both modes. PG mode is missing three capabilities that classic mode has: security rules, documentdb-level backup and rollback, and the realtime database (watch()).
Available in classic mode only
The following capabilities are currently available in classic-mode environments only; PG-mode environments do not support them yet:
- APIs — see the API reference
- MySQL database — see the API reference
- Data models — see the API reference
- The classic cloud storage API — see Classic-mode cloud storage
Enable the Document plugin (pgdoc) in the PostgreSQL database; clients keep using the document database HTTP API and SDK.
Related
- JS SDK v3 reference: written with PG mode as the main line; classic-mode-only content lives in the "Classic mode (not available in PG mode)" sidebar group
- PG mode overview: read this first when deciding whether to move to PG mode
- v2 to v3 migration guide