Skip to content

Create and Manipulate Database Schemas

Use every current Database Manager creation and manipulation path: connections, tables, fields, relations, document structures, data, seeds, templates, and refresh actions.

Introduction

Database Manager is both a schema browser and a schema editor. Work on a local development target, create or manipulate the structure from the tree, review the Properties panel, apply the pending changes as a migration, then test the affected data and server actions before publishing.

Create connections and top-level structures
Model fields and relationships from the selected node
Apply intentional changes as repeatable migration history

Create a database connection

The Databases branch exposes New Connection. A connection defines the database engine and target-specific access Wappler uses for schema discovery, data editing, queries, seeds, and migrations. Name it clearly and confirm that the current project target is the intended development target before adding structure.

Create from the Tables context menu

This opens the real Tables menu. New Table starts an inline-named SQL table; CouchDB and PouchDB use New Collection. This branch also applies database templates, opens the templates folder, refreshes the list, or reloads the full schema.

Tables branch action reference

Choose the branch action that matches the job. Creating is intentionally separate from refreshing or applying a reusable template.

Action Result
New Table / New CollectionCreates a provisional structure and starts inline naming; cancelling removes it.
Apply Database TemplatesGenerates and applies the selected reusable schema template.
Manage Templates FolderOpens the project template location for maintenance.
Refresh ListReloads the connection's table list.
Refresh Full SchemaReloads complete schema metadata for the connection.

New SQL tables start with a primary key

A regular SQL table receives a primary key using the connection or project default. Auto-increment is the normal default; UUID and timestamp-based key styles are also supported. Review the generated field and naming convention in Properties before building relationships around it.

All table creation and manipulation actions

This opens the current menu on the live users table. Creation commands sit beside live-data, reuse, naming, deletion, navigation, and refresh commands so the selected table remains the center of the workflow.

SQL table action reference

The current table menu covers structure, data, reuse, and tree maintenance. Destructive actions are explained here but are not run by the tour.

Action Use
New FieldAdds a normal column and opens its properties.
New ReferenceAdds a foreign-key style link to one parent record.
New Multi ReferenceCreates the junction structure for a many-to-many relationship.
New Sub TableCreates an owned child table, primary key, and parent reference with cascading updates/deletes.
View/Edit DataOpens live row browsing and editing; this changes data, not schema history.
Create SeedCreates reusable bootstrap data for the table.
Create New TemplateCaptures reusable schema setup from the selected table.
AI AssistantOpens schema assistance when the project assistant is available.
Rename / DeleteChanges or removes the selected schema object; review dependencies first.
Collapse All / Expand AllControls the visible tree depth under the selected node.
Refresh SchemaReloads schema metadata for the selected table.

SQL field types available in Properties

Choose the semantic type that matches the values and the database engine. Advanced properties then refine length, precision, defaults, unsigned/nullability, indexing, uniqueness, and engine-specific behavior.

Group Types
Textstring, text, enum
Integer and identityincrements, bigIncrements, integer, bigInteger
Numericfloat, decimal
Identifiers and relationsuuid, reference
Date and timedate, datetime, time, timestamp
Other scalarboolean, binary
Structuredjson, jsonb, array, object
Database-specificspecificType

Reference, multi reference, or sub table?

Use New Reference when this table stores one parent identifier. Use New Multi Reference when records on both sides can have many links; Wappler creates the junction table and reference fields. Use New Sub Table when the child rows belong to the parent; Wappler creates the child key and cascading parent reference automatically.

Reference: many children point to one parent
Multi Reference: many records link to many records
Sub Table: a parent owns a nested child collection

Document and JSON structure creation

CouchDB, PouchDB, and document-shaped nodes expose New Variable or New Field, New Array, and New Object. CouchDB and PouchDB also expose New Reference and New Multi Reference. Their Views branch exposes New View, while Import Schema on supported view/table contexts imports external structure. Nested variable, array, and object nodes repeat the creation choices, letting the tree describe the document shape directly.

Document type Purpose
objectIdDocument identifier.
reference / multiReferenceSingle or multiple document links.
text / number / booleanScalar values.
date / timeTemporal values.
fileFile-oriented value.
arrayRepeated nested values.
objectNested named structure.

Use Basic and Advanced deliberately

Basic keeps common properties and assisted relationship setup visible. Advanced exposes deeper structural details and advanced-only nodes. Switching views does not apply a change; it changes how much configuration you can inspect and edit.

Direct connection is required for manipulation

Database Manager can discover schema through supported target paths, but table/field manipulation and live data editing require a direct connection where that option applies. Schema editing is restricted to local development targets so changes can become tested migrations before deployment.

Fast access and safe refresh

The same selected-node workflow is accessible through the UI shortcuts: Plus creates for the current context, F2 renames, Delete requests removal, and F5 refreshes. Search filters a large tree; Refresh reloads schema; Apply Database Changes commits validated pending structure into migration history.

Control Meaning
+Create the structure valid for the current selection.
F2Rename the selected supported node.
DeleteRequest deletion of the selected supported node.
F5Refresh the current tree context.
SearchFilter visible schema nodes.
Apply Database ChangesValidate, describe, generate, and apply a migration.

Next steps

You now have the complete creation and manipulation map. Continue with Migrations and Change History for apply, rollback, per-migration, reset, and unlock actions, then Seeds and Templates for reusable data and schema setup.