Creating and managing databases

If you have multiple workspaces, then before you create or edit a database, make sure that you are in the correct workspace.

To change to a different workspace, in the user menu, click Switch Workspaces, then select the workspace.

Starting a new database

To start a completely new database:

  1. Click the database dropdown at the top right, then click New Database.

Database dropdown with the New Database option
  1. On the Create a New Database panel, in the Database Name field, provide a name for the database.

  2. From the Type dropdown list, select the database type.

  3. Optionally, in the Schema Definition text area, provide one of the following to define the database schema:

    • SQL DDL script

    • prisma.schema script

    • Swagger YAML API definition. Fabricate uses the API endpoint request and response information to derive the database tables and columns.

    • A prompt that describes the database. For example, "Create a database that tracks orders, including customer and product details". The Fabricate AI uses that as the basis to set up an initial version of the relevant tables.

    • Content from a different type of script or definition file, such as a JSON or XML schema or a DTD. The Fabricate AI then attempts to interpret the information and then use it to set up the database.

  4. Optionally, expand More options, and in the AI Hints field, provide an additional prompt to help further define the database. For example, you might indicate specific generators to use, or provide limits on specific values.

  5. Click Create Database.

Fabricate displays the database details page for the database.

Selecting a database to manage

To select a database to manage:

  1. Click the database dropdown at the top right.

  2. In the dropdown list, select the database.

Cloning an existing database

You can create a new database based on an existing database. The new database inherits all of the configuration from the original database.

To clone a database:

  1. Select the database to clone.

  2. In the database header, click Clone Database.

  3. On the Clone Database panel, in the New Database Name field, provide a name for the new database.

  4. Click Clone Database.

Changing the database name and type

From the database Settings tab, you can change the database name and type.

Name and Type fields on the database Settings tab
  1. In the Name field, provide the new database name.

  2. From the Type dropdown list, select the new database type.

  3. Click Save Changes.

Setting the schema name for PostgreSQL and SQL Server databases

For PostgreSQL and SQL Server databases, you can optionally provide a schema name to use when you export data.

On the Settings tab, in the Schema Name field, provide the name of the schema.

Database Settings tab with the Schema Name field

Deleting a database

To delete a database, on the database Settings tab:

  1. Click Delete Database.

  2. On the confirmation panel, click Delete Database.

Last updated