# Upgrading

Pull the current version:

```
git pull
```

Check if dependencies got added/updated/removed

```
yarn
```

Apply database migrations by running **one of** the following commands:

In a development environment, run:

```
yarn workspace @calcom/prisma db-migrate
```

(this can clear your development database in some cases)

In a production environment, run:

```
yarn workspace @calcom/prisma db-deploy
```

Check for `.env` variables changes

```
yarn predev
```

Start the server. In a development environment, just do:

```
yarn dev
```

For a production build, run for example:

```
yarn build
yarn start
```

Enjoy the new version.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://calcom.gitbook.io/docs/introduction/quick-start/self-hosting/upgrading.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
