Skip to main content

Overview

Manages table definitions in your Applad project. Each table lives in its own YAML file under tables/. “tables” is the universal term regardless of whether the underlying adapter is relational (PostgreSQL, MySQL) or document-based (MongoDB). Permission rules live alongside the schema in the same file.

Commands

applad tables list

Lists all tables defined in the active project’s tables/ directory, along with their field counts and whether they have permissions defined.
applad tables list

applad tables generate

Generates a new empty table definition file at tables/<name>.yaml with placeholder fields, indexes, and permission rules. Edit the generated file to define your actual schema. Running applad db migrate will apply it.
applad tables generate <name>
Example:
applad tables generate users

applad tables validate

Validates all table definition files for correctness — checks field types, relation references (does the referenced table exist?), permission rule syntax, and index definitions. Does not touch the database.
applad tables validate

applad tables show

Shows the full schema and permission rules for a specific table as currently defined in the YAML file.
applad tables show <name>
Example:
applad tables show users

applad tables diff

Shows the difference between a table’s YAML definition and what actually exists in the database. Useful for catching drift — cases where the database schema has diverged from what the config files describe, usually because a migration was applied manually or a file was edited without running migrations.
applad tables diff <name>
Example:
applad tables diff posts

Build docs developers (and LLMs) love