Studio
Databases
Create a project, open a project folder, add a connection, and switch, rename, or burn databases in Fakebase Studio.
Studio works with two kinds of databases:
- A project is a folder with a
fakebase.tomland amigrationsfolder, usually the root of your app's repository. Projects have migrations. - A connection is any PostgreSQL database you add with a connection string. You can browse and edit it, and create a project for it later to add migrations.
Everything starts from the database picker at the top of Studio.
New project
Creates a project and a local PostgreSQL database for it in Docker.
- Open the database picker and choose New project, or press ⌘P.
- Choose the Project folder. This is usually the root of your app's repository.
- Optionally give the project a Name.
- Choose Create project.
Studio writes fakebase.toml and a migrations folder, then starts the database. The first start downloads PostgreSQL, so it can take a minute. If the folder already has a project, Studio opens it instead.
Open a project folder
Opens a project that already exists, for example one a teammate created.
- Open the database picker and choose Open project folder, or press ⌘E.
- Choose the folder with
fakebase.toml, or any folder inside it. - Choose Open.
If the project's database isn't set up on this machine yet, Studio asks how to connect it:
- Local database: choose Start database to create it in Docker, or use a connection you've already saved.
- External database: choose the saved connection the project's migrations should apply to.
Add a connection
Connects to a PostgreSQL database you already have, like one on Supabase, Neon, Railway, or AWS RDS.
- Open the database picker and choose Add new connection, or press ⌘O.
- Optionally give it a Connection name.
- Paste the Connection string.
- Choose Connect.
A connection string looks like this. Copy yours from your provider's dashboard:
postgresql://user:password@host:5432/database
Connection strings are encrypted and stored only on your machine.
If the connection fails, check that the username, password, host, and port are right, that the database accepts connections from your IP address, and that the SSL settings match what your provider expects.
To add migrations to a connection, open Migrations and choose Create project.
Switch databases
Open the database picker and choose a database. Type in Find connection to filter the list. The dot next to each one shows whether it can be reached, and a folder icon marks projects.
Every page in Studio works on the database you have selected.
When you're signed in, you can also choose My Projects at the bottom of the sidebar to see every database, switch to one, rename it, copy its connection string, or delete it from Studio.
Rename a database
Choose the gear next to the database picker, then Rename project. This changes the name in Studio only, not the database itself.
Burn a database
Burning clears every table, all data, and the rest of the schema in the selected database, so you can start over. The database stays in Studio.
- Choose the gear next to the database picker, then Burn database.
- Review what will be removed.
- Choose whether to also remove the migration files and setup. If you keep them, every migration becomes pending again, so you can apply them to the empty database.
- Type the database name to confirm, then choose Burn database.
