GithubHelp home page GithubHelp logo

rjuilliot / migrate-v1-v2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from umami-software/migrate-v1-v2

0.0 0.0 0.0 123 KB

Script for migrating data from Umami v1 to v2

License: MIT License

JavaScript 100.00%

migrate-v1-v2's Introduction

@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.

migrate-v1-v2's People

Contributors

franciscao633 avatar mikecao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.