|
6 | 6 |
|
7 | 7 | 1. Fork the [https://github.com/umami-software/umami](https://github.com/umami-software/umami) project to your GitHub account. |
8 | 8 | 2. Create a database on PlanetScale called `umami-db` and get its connection string (Hint: select "Prisma" from the "Connect with" menu). It should look something like this: `mysql://username:password@host/umami-db?sslaccept=strict` |
9 | | -3. Add `DATABASE_URL` and `HASH_SALT` (any random string) to your `.env` file: |
| 9 | +3. Add `DATABASE_URL` and `SKIP_DB_CHECK` to your `.env` file: |
10 | 10 | ``` |
11 | 11 | DATABASE_URL=mysql://username:password@host/umami-db?sslaccept=strict |
12 | | -HASH_SALT=any-random-string |
| 12 | +SKIP_DB_CHECK=1 |
13 | 13 | ``` |
14 | | -4. Open `schema.mysql.sql` and delete all lines after `-- AddForeignKey`. See example below. |
15 | | - |
16 | | -``` |
17 | | --- AddForeignKey |
18 | | -ALTER TABLE `event` ADD CONSTRAINT `event_ibfk_2` FOREIGN KEY (`session_id`) REFERENCES `session`(`session_id`) ON DELETE CASCADE ON UPDATE NO ACTION; |
19 | | -
|
20 | | --- AddForeignKey |
21 | | -ALTER TABLE `event` ADD CONSTRAINT `event_ibfk_1` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE CASCADE ON UPDATE NO ACTION; |
22 | | -
|
23 | | --- AddForeignKey |
24 | | -ALTER TABLE `pageview` ADD CONSTRAINT `pageview_ibfk_2` FOREIGN KEY (`session_id`) REFERENCES `session`(`session_id`) ON DELETE CASCADE ON UPDATE NO ACTION; |
25 | | -
|
26 | | --- AddForeignKey |
27 | | -ALTER TABLE `pageview` ADD CONSTRAINT `pageview_ibfk_1` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE CASCADE ON UPDATE NO ACTION; |
28 | | -
|
29 | | --- AddForeignKey |
30 | | -ALTER TABLE `session` ADD CONSTRAINT `session_ibfk_1` FOREIGN KEY (`website_id`) REFERENCES `website`(`website_id`) ON DELETE CASCADE ON UPDATE NO ACTION; |
31 | | -
|
32 | | --- AddForeignKey |
33 | | -ALTER TABLE `website` ADD CONSTRAINT `website_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `account`(`user_id`) ON DELETE CASCADE ON UPDATE NO ACTION; |
34 | | -``` |
35 | | - |
36 | 14 | 5. Download the [PlanetScale CLI](https://github.com/planetscale/cli/releases) and authenticate with `pscale auth login`. |
37 | | -6. Create the tables by running the following command on the root of the project: `pscale shell umami-db main < sql/schema.mysql.sql`. |
38 | | -7. You should now be able to build and start Umami (`npm run build` followed by `npm start`). |
| 15 | +6. Create the tables by running the following command on the root of the project: `pscale shell umami-db main < sql/schema.mysql.sql`. |
| 16 | +7. You should now be able to build and start Umami (`yarn build` followed by `yarn start`). |
39 | 17 | 6. Follow the **Getting started** guide starting from the [Login](/docs/login) step and be sure to change the default password. |
40 | 18 |
|
41 | 19 | ### Troubleshooting |
|
0 commit comments