From database to pull request

Connect your SQL database to a GitHub branch, give the agent your project context, and review the code it proposes when your schema changes.

Before you start

You’ll need a reachable PostgreSQL, MySQL, or Microsoft SQL Server database and a GitHub repository that uses it. An organisation owner or admin can configure the connections.

Create a dedicated database account using the guide for your engine:

Read Security & data for the data we use, layered encryption, and AI data retention.

1. Choose your organisation

Open the workspace and choose an organisation from the navigation. To create a new workspace, select Create organisation.

Databases, GitHub installations, branch connections, and subscriptions belong to the selected organisation. Owners and admins configure resources and invite teammates from Organisation settings. Owners manage billing.

2. Connect GitHub

Install the GitHub App for the selected organisation and choose the repositories it can access. If you are a member, ask an owner or admin to connect it.

After installation, return to the workspace. Your accessible repositories appear under GitHub repositories; use Refresh if you have just changed repository access.

3. Add your database

Select Add database in the workspace. Choose your database engine and enter its connection details using the dedicated account you created earlier.

Use the relevant guide if you still need to prepare your account: PostgreSQL, MySQL, or Microsoft SQL Server.

On your database, select Link repository branch, choose a repository and branch, then select Link branch.

Open that connection’s settings to configure:

  • Schemas to track: choose All schemas to include every schema, including new ones, or Specific schemas to select only the schemas this branch uses. Select at least one schema when using specific tracking.
  • Additional instructions: tell the agent about your framework, conventions, tests, and boundaries. Be concrete about the changes you want it to make.

Each branch connection has its own settings, so different repositories can follow different conventions.

5. Check changes and review

Select Check changes on a branch connection. Members can run checks when the organisation has an active subscription.

Follow progress under Run history. When a run produces a proposal, inspect its schema diff and open the resulting pull request in GitHub. Your team reviews the proposed code and decides what to merge.

Initial schema capture establishes the starting point for comparison. Connecting a database does not by itself generate application-code updates. For a concrete development-database example, follow Your first pull request.

Schema optimisation

Optimisation reviews the recorded schema alongside repository code for possible indexing and data-model improvements. It is started by scheduled service jobs, rather than the Check changes button. Filter Run history by Schema optimisation to see results. Read how optimisation works for expectations and review guidance.

Manage capacity

Branch-connection limits apply to the organisation. The workspace sidebar shows how many connections are used. If you reach the limit, open Connection limit reached on a database for a link to pricing or subscription management.

Only organisation owners can manage the subscription. View pricing or open Organisation → Subscription & capacity in the workspace.

Ready to put it to work? Open your workspace.

Documentation - Reverse Migrations