User Guide

User Guide

Get started with FoxSchema

Install it, connect two databases, and run your first comparison in a few minutes. When you are ready for more, the Feature Guide covers everything else.

Safe by default. FoxSchema never changes your source database. It writes only to a target, and only when you apply a change. Every migration is previewed first, a pre-migration snapshot is taken before it runs, and the run is recorded in History.

1 · Install and open

Pick one way to install. Then run foxschema: it starts FoxSchema and opens http://localhost:3210 in your browser.

npm (recommended)

npm install -g foxschema
foxschema                 # starts FoxSchema and opens http://localhost:3210

This needs Node.js 22.5 or newer. On Windows, install Node first with winget install OpenJS.NodeJS.LTS.

Docker (shared or team server)

docker run -d --name foxschema \
  -p 3210:3210 \
  -v foxschema_data:/data \
  5nickels/foxschema:latest

Open http://localhost:3210. Your connections and history live on the foxschema_data volume, so keep it.

Homebrew (macOS)

The Homebrew commands are on the Install page.

Handy commands. foxschema shortcut puts a Fox icon on your Desktop. Closing the browser does not stop FoxSchema, so run foxschema stop when you are done, and foxschema doctor to check that it is running.

2 · Sign in for the first time

Every install asks you to sign in.

  • The first time, FoxSchema shows Create your account. The first account on an install is its administrator, and after that only an administrator can add people.
  • If you opened FoxSchema from the command line on your own machine, it can let you straight in and show a banner asking you to create your account. You have 7 days before FoxSchema asks for it.
  • FoxSchema emails a code to confirm your address. Enter it in the Verify your email banner, or choose Send a new code.
  • On a brand-new install you may see an optional Get product updates screen before the account page. Choose Skip for now if you prefer; it appears once.
  • After you sign in, three quick questions (What best describes you?, Which database do you use most? and What would you like to do first?) tailor your first screen. Choose Skip — take me to the app to go straight in.

You land on Home. The left rail takes you to Compare, Editor, Utils, Access, Workflow, Snapshots, and Creds and Applies at the bottom. Press ⌘K or Ctrl+K to search them.

Keep your encryption key. FoxSchema sets up a key that protects the database passwords you save. If it changes, saved passwords can no longer be read and you will need to enter them again. The command-line install keeps it in your user data folder, and Docker keeps it on the /data volume.

3 · Build a sample playground

No database handy? Create two schemas that differ on purpose, then watch FoxSchema find every difference. Run both scripts on PostgreSQL or MySQL; they work on either.

Schema A: the “source”

CREATE SCHEMA demo_a;

CREATE TABLE demo_a.customers (
  id            INT PRIMARY KEY,
  email         VARCHAR(200) NOT NULL,
  full_name     VARCHAR(120),
  signup_date   DATE,
  last_login_at TIMESTAMP          -- only in A
);

CREATE TABLE demo_a.orders (
  id          INT PRIMARY KEY,
  customer_id INT NOT NULL,
  total       DECIMAL(10,2) NOT NULL,
  status      VARCHAR(20)
);

CREATE INDEX idx_customers_email ON demo_a.customers (email);
CREATE INDEX idx_orders_customer ON demo_a.orders (customer_id);

INSERT INTO demo_a.customers (id, email, full_name, signup_date) VALUES
  (1, 'ada@example.com',   'Ada Lovelace',   '2024-01-15'),
  (2, 'linus@example.com', 'Linus Torvalds', '2024-02-02'),
  (3, 'grace@example.com', 'Grace Hopper',   '2024-03-30');

INSERT INTO demo_a.orders (id, customer_id, total, status) VALUES
  (1, 1,  99.00, 'paid'),
  (2, 2, 149.50, 'paid'),
  (3, 3,  20.00, 'refunded');

Schema B: the “target” (drifted)

CREATE SCHEMA demo_b;

CREATE TABLE demo_b.customers (
  id          INT PRIMARY KEY,
  email       VARCHAR(200) NOT NULL,
  full_name   VARCHAR(80),           -- narrower than A
  signup_date DATE,
  legacy_flag INT                    -- only in B
);

CREATE TABLE demo_b.orders (
  id          INT PRIMARY KEY,
  customer_id INT NOT NULL,
  total       DECIMAL(10,2) NOT NULL,
  status      VARCHAR(20)
);

CREATE TABLE demo_b.audit_log (      -- only in B
  id        INT PRIMARY KEY,
  action    VARCHAR(50),
  logged_at TIMESTAMP
);

-- no indexes here: A has idx_customers_email and idx_orders_customer

INSERT INTO demo_b.customers (id, email, full_name, signup_date) VALUES
  (1, 'ada@example.com',   'Ada Lovelace',  '2024-01-15'),
  (2, 'linus@example.com', 'Linus T.',      '2024-02-02');

4 · Connect your databases

  1. Click Creds on the left rail.
  2. Pick the database type. Saved connections are grouped by type, and you can search them by name.
  3. Enter the host, port, database, username and password, and a schema if you want one. SQLite and DuckDB use a file path instead: choose it with Browse….
  4. Click Load Schema to check the connection, then Save Credential. Give it a name you will recognise.

Save one connection for each side you want to compare. For the sample, save two connections to the same server, one pointing at demo_a and one at demo_b, and call them “Sample A” and “Sample B”.

Passwords are encrypted and never sent back to your browser. Running FoxSchema in Docker? localhost means the container itself, so use your machine’s IP address to reach a database on your computer.

5 · Compare and migrate

  1. Open Compare on the left rail.
  2. Choose Original Server (Sample A) and Target (Sample B), then click Compare.
  3. Read the diff. Each object is marked Added, Modified, Removed or Unchanged. Click any object to see the exact column, index and key changes.
  4. Open Migration SQL to see the runnable script for the Target’s dialect. Nothing has been applied yet.
  5. When you are happy with it, tick the objects to deploy (Deploy to Target), click Execute Sync Script, tick the acknowledgement if the plan drops anything, and confirm. FoxSchema takes a snapshot first.

What you should see with the sample

To make Sample B match Sample A, FoxSchema would:

  • drop the table audit_log, which exists only in B;
  • add the column last_login_at to customers, and drop legacy_flag;
  • widen full_name from VARCHAR(80) to VARCHAR(120);
  • create the indexes idx_customers_email and idx_orders_customer.
Only execute this on the sample. The migration drops audit_log and legacy_flag from Sample B, because B has to match A. Always read the SQL first on a real database.
Structure, not rows. Compare looks at the schema. The sample’s differing rows (customer 3 is missing from B) show up in the Editor’s Compare data, which the Feature Guide explains. Prefer the terminal? foxschema compare --source "Sample A" --target "Sample B" runs the same comparison.

Troubleshooting

“Connection failed” or a timeout

Check the host and port, and that the database accepts connections from where FoxSchema runs. In Docker, localhost means inside the container, so use your machine’s IP address or a service name instead.

The port is already in use

FoxSchema uses 3210 by default. If another app has it, FoxSchema moves to the next free port when you open it from the command line (unless you passed --port). You can also stop FoxSchema with foxschema stop or free the port, then run foxschema again. With Docker, publish a different host port, for example -p 8090:3210.

Is FoxSchema still running after I closed the browser?

Yes. Closing the browser does not stop the server. Run foxschema doctor to see whether it is up, and foxschema stop to shut it down.

“Driver not installed” for a database type

The connection form, the Editor’s schema browser and a failed run all offer Install driver. Installing needs the Install drivers permission, which administrators have by default; without it the banner shows the command to run instead. IBM Db2 is optional and platform-specific: run foxschema drivers install db2, then foxschema stop and foxschema again.

Saved passwords stopped working

The encryption key changed. With the command-line install, keep the same data folder. With Docker, restore the original key or volume. Otherwise, enter the passwords again.

My saved connections disappeared

Connections belong to a workspace. Click the workspace button under the Fox mark and switch back to the one you were in. With Docker, check that you did not remove the /data volume: docker compose down -v deletes it.

Still stuck? Tell us what you did and the error you saw on the Contact page.

Where to next

The Feature Guide walks through every feature, step by step.

Want to go deeper?

Browse all 28 features, or tell us what you would like built.

Scroll to Top