Skip to main content
Docs/Database (Advanced)
DocsDatabase (Advanced)
Free

Database (Advanced)

Schema changes on a live app, how columns are named, support for older tables, and where per-user data access stands. Sibling to /docs/database for power users.

Migrations

When you change a schema after the table has been provisioned, GenMB applies the diff: new columns added with their defaults, removed columns dropped, type changes applied where Postgres permits. The migration runs on save; the Database Browser reflects the new state immediately.

Type changes are best-effort. Dropping a column is permanent. For destructive changes on a live app with real data, back up via Export first or use a transient workspace to validate.

Column Naming

GenMB names every column in your PostgreSQL tables in camelCase (for example createdAt and updatedAt). This includes the created and updated timestamps GenMB adds for you when you do not define them yourself. You do not have to manage this by hand - describe the columns you want in chat and GenMB sets the names up consistently.

If you ever look at your data in the Database Browser, column names like createdAt are what you will see. Use that exact spelling when you ask GenMB to filter or sort by a column.

Older Tables

Some apps created before mid-2026 have older-style column names like created_at and updated_at instead of the camelCase form. You do not need to do anything: GenMB automatically maps the old names to the new ones when it reads your data, so existing apps keep working and you can refer to either name.

This is fully automatic. You will not see a difference in your app or in the Database Browser, and there is nothing to migrate or clean up.

Per-User Data Access

A common need is that each person only sees their own rows - their own orders, notes, or bookings, never someone else's. GenMB handles this in your app's backend logic today: it checks the signed-in user against each record's owner before returning it. If you want this, just ask in chat - for example, "only let each user see their own tasks" - and GenMB wires it up using your app's sign-in and, if you use them, your access roles.

A deeper, database-level version of this protection is built into the platform but is not switched on yet. The per-user checks in your app's backend logic are what keep data separated in the meantime.

Stuck Schemas

If a schema gets stuck in a pending or failed state, GenMB recovers it automatically the next time your app reads or writes data - it re-runs the setup behind the scenes. In most cases the table is ready again within seconds without any action from you. If a schema stays stuck, reprovision it from the Schema panel, or ask in chat and we will sort it out.

See Database & Schema for the basic workflow.

FAQs

When do I need this page vs /docs/database?
Most people only need /docs/database (Schema Designer, the Database Browser, viewing and editing records). Read this page when you are changing a schema on a live app with real data, want to understand how columns are named, or are wondering whether each user can be limited to their own rows.
Can I run raw SQL?
Through the Database Browser, yes (read queries). Production writes happen through the DataConnect SDK with parameterized queries; arbitrary SQL writes are intentionally not exposed to avoid bypassing the safety nets.
How are columns named?
GenMB names every PostgreSQL column in camelCase (for example createdAt and updatedAt), including the created and updated timestamps it adds for you. If you describe columns in plain English in chat, GenMB handles the exact naming so your app and its data stay in sync.
Can each user see only their own rows?
Yes. Today this is handled in your app's backend logic: GenMB checks the signed-in user against each record's owner before returning it, so people only see their own data. Database-level row-level security is built into the platform but not switched on yet.

Ready to build?

Create your first app for free, no credit card required.