Refactor migrations.

This commit is contained in:
Mike Cao 2022-06-19 00:07:01 -07:00
parent 5899a8d45c
commit 3122bab419
15 changed files with 46 additions and 65 deletions

View file

@ -16,10 +16,10 @@ See [Running on Railway](https://umami.is/docs/running-on-railway) to get starte
### Requirements
- A server with Node.js 12 or newer
- A database (MySQL or Postgresql)
- A server with Node.js version 12 or newer
- A database. Umami supports [MySQL](https://www.mysql.com/) and [Postgresql](https://www.postgresql.org/) databases.
### Install Yarn (if needed)
### Install Yarn
```
npm install -g yarn
@ -33,12 +33,6 @@ cd umami
yarn install
```
### Database
Umami supports [MySQL](https://www.mysql.com/) and [Postgresql](https://www.postgresql.org/).
The database structure will automatically be applied on the first start of Umami.
This will also create a login account with username **admin** and password **umami**.
### Configure umami
Create an `.env` file with the following
@ -57,6 +51,15 @@ mysql://username:mypassword@localhost:3306/mydb
The `HASH_SALT` is used to generate unique values for your installation.
### Check database
```bash
yarn check-db
```
The database structure will automatically be applied on the first start of Umami.
This will also create a login account with username **admin** and password **umami**.
### Build the application
```bash