Welcome back

Sign in with GitHub, Google, or your email and password

or

Don't have an account? Create one

Setup your environment

Set up migrations

Link a migrations folder to your database so Fakebase can track schema changes.

After you have a database, set up migrations so schema changes live in your project as SQL files. The work you do in Fakebase then travels with your repo - ready for deploy, and easy to pick up again later.

Open Set up migrations from the migrations area, or continue into it after creating a local database. You will choose one of two starting points.

Set up in a project

This path creates migration files from the database you already have. Fakebase reads the current schema and writes it into your project.

  1. Choose Set up in a project.
  2. Pick the project folder (the root of your git repo).
  3. Choose a subfolder — migrations/ or db/migrations/.
  4. Confirm. Fakebase snapshots the schema as a baseline, or generates an initial migration file from the existing database.

Use this when you do not have migration files yet. The database is the source of truth, and Fakebase turns it into SQL in your repo.

Setting up migration from a fakebase project

Use existing folder

This path is an import. You already have migration files, and the database adopts them.

  1. Choose Use existing folder.
  2. Pick the folder that already contains the migration files.
  3. Confirm. Fakebase links those files to this database so it can follow that history — including adopting files that already match the database, or importing SQL that is not in the journal yet.

Use this when the files are the source of truth — for example from another tool, a teammate, or a previous Fakebase setup. The database is brought in line with what you import.

Importing an existing migrations folder to setup fakebase db