Getting started with FoxSchema
FoxSchema compares two databases, shows exactly what differs, and writes the SQL to make one match the other. It never changes your source database — it only writes to the target, and only when you explicitly apply a migration.
1. Install & run
Pick whichever fits your workflow — a shared web instance, a native desktop app, or the terminal.
Web app (Docker — recommended for teams)
Change the port with PORT= in .env. Saved connections and history persist on a Docker volume.
Desktop app
A regular macOS / Windows / Linux application — nothing to configure, it stores data locally in your OS keychain. Download for your OS →
xattr -cr "/Applications/Fox Schema.app", or right-click the app in Finder → Open.CLI
2. First run & the encryption key
On first launch FoxSchema sets up an encryption key that protects the database passwords you save. In Docker that's the APP_ENCRYPTION_KEY from .env; on desktop it's created for you and kept in your OS keychain.
3. Connect a database
- Click Add connection.
- Pick the type — PostgreSQL, MySQL, MariaDB, SQL Server, Azure SQL, Oracle, IBM Db2, SQLite, ClickHouse, or Amazon Redshift.
- Fill in host, port, database, username, password (and optionally a schema).
- Test the connection, then save. Passwords are encrypted at rest and never shown back to the browser.
Do this for both the source (compare from) and the target (compare to).
4. Compare & read the diff
Choose a source and target connection, then click Compare. Results are grouped by object type:
Click any object to drill into its column, index, foreign-key, and trigger differences. Comparing two different database types (e.g. Postgres → MySQL)? FoxSchema is cross-dialect aware — equivalent types aren't flagged, and a readiness panel shows which object types translate cleanly vs. need a manual look.
5. Generate & apply a migration
- From the diff, choose Generate migration to get runnable DDL for the target's dialect. Nothing is applied yet.
- Review the SQL, then choose Deploy / Migrate. A pre-migration snapshot is taken first.
- Skip failures (optional): continue past any single object that fails instead of rolling back the whole run — the result then lists what was skipped.
You can always copy the generated SQL and run it yourself instead of applying it through FoxSchema. Every applied migration is recorded in History — status, script, snapshot, and per-object results (no passwords stored).
6. Troubleshooting
- Connection failed / timeout. Check host and port. In Docker,
localhostmeans inside the container — use the host's IP or a service name to reach a DB on your machine. - Port already in use. Change
PORTin.envand restart withdocker compose -f docker-compose.app.yml up -d. - "Driver not installed". Some drivers are optional/platform-specific (notably IBM Db2) — see the deployment docs.