Socket
Book a DemoInstallSign in
Socket

@umami/migrate-v1-v2

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umami/migrate-v1-v2

Script for migrating data from Umami v1 to v2

0.15.0
latest
Source
npmnpm
Version published
Maintainers
2
Created
Source

@umami/migrate-v1-v2

Script for migrating data from Umami v1 to v2.

Requirements

  • Database schema must be in sync with the latest v1 Umami repo. The script will query the prisma migrations table to ensure the latest migrations have been ran.

Important

  • Backup your target database prior to use. Potential data loss may occur if the migration is interrupted.
  • For users with larger datasets (5M+), the migration may take while. Please plan accordingly.
  • The script will NOT migrate any event data into v2.
  • The script will ask you if you want to drop your v1 tables after the migration is complete.
  • If an event_data table is found populated with data, it will be renamed to v1_event_data but not dropped.

Running migration

There are two ways to run the migration script.

1. Running inside the Umami folder

cd umami
yarn add @umami/migrate-v1-v2
npx @umami/migrate-v1-v2

2. Running standalone

Install

git clone https://github.com/umami-software/migrate-v1-v2.git
cd migrate-v1-v2
yarn install
yarn build

Configure

Create an .env file with the following variable defined:

DATABASE_URL={connection url}

Run

yarn start

Troubleshooting

  • If your DATABASE_URL is localhost and the migration can't connect to the database, try changing to an IP address, for example: 127.0.0.1.

FAQs

Package last updated on 19 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.