Umami v2 introduces a redesigned schema and a number of breaking changes.
.track()method and a new way to send event data. See Tracker functions for more information.
TRACKER_SCRIPT_NAMEenvironment variable no longer appends the
.jsextension to the script name. See Environment variables for more information.
Due to the schema changes, your data in your v1 database needs to be converted into v2.
To assist with the migration we created a script
@umami/migrate-v1-v2 that will migrate all of your data for you.
event_datatable is found populated with data, it will be renamed to
v1_event_databut not dropped.
DATABASE_URLis localhost and the migration can't connect to the database, try changing to an IP address, for example:
There are two ways to run the migration script.
Use this method if you have terminal access to your application folder.
Make sure your application is already built. If not run
yarn build first.
cd umami npx @umami/migrate-v1-v2@latest
Use this method if you don't have access to your application folder like when deployed to Vercel or Netlify.
git clone https://github.com/umami-software/migrate-v1-v2.git cd migrate-v1-v2 yarn install yarn build
.env file with the following variable defined:
Go into your running Docker container. You can find the name by the output of
docker exec -ti -u 0 <app container name> sh
Run the migration script.
When the migration is run successfully, it should look like this: