# Ship a change (/en/docs/deployment/after-launch/ship-a-change)

With [Ship on merge](/en/docs/deployment/ship-on-merge) configured, a merge triggers database and host deployments. Check their results before relying on the change.

**Give your agent this prompt:**

```text interactive=true
Prepare <change> for release, including migration compatibility.
Follow https://coremvp.com/en/docs/deployment/after-launch/ship-a-change.md and its prerequisites.
Name and run a check for <change> locally; finish when it passes and a local commit is ready. Ask me before a push that triggers deployment, a destructive migration, merging or deploying.
Report what changed, the check results and anything you could not run.
```

Before merging database changes, follow [Add first, use later](#add-first-use-later) and check compatibility with the live app.

### 1. Work on a branch

Replace `<change-name>` with your branch name.

```bash interactive=true
git switch main && git pull
git switch -c <change-name>
```

Make the change and run it locally ([Quickstart](/en/docs/quickstart)). Name and run a check that exercises the changed behavior.
For a database change, add a migration as in
[Change the schema](/en/docs/database/change-schema).

### 2. Commit, open a pull request and merge

Add the files you changed, including any new migration, then:

Replace `<changed-files>` with the paths to stage and `<what changed>`
with a commit message.

Install and authenticate the GitHub CLI for `gh pr create`, or open the pull request in GitHub instead.

```bash interactive=true
git add <changed-files>
git commit -m "<what changed>"
git push -u origin <change-name>
gh pr create --fill
```

Review the pull request and checks before merging. After the merge, check
both the Supabase and host results; either deployment can fail.

## Check it works

The merged commit on GitHub shows passing checks from Supabase and your host.
Repeat your change-specific check on the production URL after both deployments pass.
To check sign-in in a browser, run the sign-in check from
[Prove it's live](/en/docs/deployment/launch-app#prove-its-live) with
`--headed`.

## Add first, use later

On each merge, Supabase and your host start at the same time, so either can
finish first. The old code may run against the new database, and the new code
may go live before its migration lands. Split every database change across
merges:

1. **Add** the new column or table. Merge.
2. **Use** it in the code, once the first merge shows Supabase's check passing.
   Merge.
3. **Remove** the old column or table in a later merge, once no live code
   reads it.

Never rename or drop something in the same merge that stops using it. Never
edit a migration that has already run in Production; add a new one.

If a merge fails, [When something fails](/en/docs/deployment/ship-on-merge#when-something-fails)
says what changed and what to do.
