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 --sqlYou'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 sqliteOutput
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 postgresqlThe command will:
- Generate SQL
- Show formatted preview
- Warn if file already exists
- Prompt for confirmation
Skip Confirmation
Use --yes to skip confirmation and overwrite existing files:
npx hot-updater db generate --sql postgresql --yesIf hot-updater.sql already exists, it will be overwritten. The command shows a warning before overwriting.