> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chartbrew.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from v2 to v3

> Learn how to migrate from v2 to v3

<Warning>
  Since this is a major release, we recommend you to back up your current v2 database before migrating to v3. All the database migration scripts are automated, but it's always better to be safe than sorry.
</Warning>

## v3 Preview

<iframe width="560" height="315" src="https://www.youtube.com/embed/15nAw318Vo4?si=Ha-uKlqItUiCfeXE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

## Major architectural changes

* The client project is now using [Vite](https://vitejs.dev/) instead of [Create React App](https://create-react-app.dev/)
* Major changes to the database schema
  * The `Connection` table is now related to `Team` instead of `Project`
  * The `Dataset` table is now related to `Team` instead of `Chart`
  * Introducing a new table called `ChartDatasetConfig` to store the relationship and configuration between a `Chart` and a `Dataset`
  * New roles within a `Team` called: `teamOwner`, `teamAdmin`, `projectAdmin`, `projectViewer`
* The UI has been upgraded from NextUI v1 to v2
* The UI is now using [TailwindCSS](https://tailwindcss.com/)
* The minimum version of NodeJS is now v20

## 🔥 Breaking changes - actions required

* `REACT_APP_API_HOST` is now `VITE_APP_API_HOST`
* `REACT_APP_CLIENT_HOST` is now `VITE_APP_CLIENT_HOST`
* New variable `VITE_APP_CLIENT_PORT` to specify where the app runs or is served. The default value is `4018`, but you will have to change this if you run the app on a different port.
* NodeJS v20 is required as a minimum version
* Team roles have changed. The previous `admin` and `editor` roles are now set as `projectAdmin`. This will not allow them to create connections and datasets, so you might have to reassign the roles for your team members in the UI.
