HotupdaterHot Updater
Self Hosting (Custom)Database Adapters

SQL Export

Since v0.22.0+

Export Hot Updater table schemas as plain SQL.

Overview

Export Hot Updater table schemas as plain SQL files without requiring a config file. Use this when you need standalone SQL for manual database setup.

For ORM-specific schema generation (Drizzle, Prisma, Kysely), see the respective adapter documentation pages.

Interactive Mode

Run the command and select your database:

npx hot-updater db generate --sql

You'll be prompted to select:

  • PostgreSQL
  • MySQL
  • SQLite

Direct Provider Selection

Specify the database dialect directly:

# PostgreSQL
npx hot-updater db generate --sql postgresql

# MySQL
npx hot-updater db generate --sql mysql

# SQLite
npx hot-updater db generate --sql sqlite

Output

Generates a single file: hot-updater.sql

The SQL file includes:

  • Hot Updater table definitions
  • Dialect-specific syntax for your selected database

Preview Before Saving

Without the --yes flag, you'll see a preview before the file is created:

npx hot-updater db generate --sql postgresql

The command will:

  1. Generate SQL
  2. Show formatted preview
  3. Warn if file already exists
  4. Prompt for confirmation

Skip Confirmation

Use --yes to skip confirmation and overwrite existing files:

npx hot-updater db generate --sql postgresql --yes

If hot-updater.sql already exists, it will be overwritten. The command shows a warning before overwriting.