Skip to content

Commit fc5e030

Browse files
authored
Merge pull request appwrite#106 from umami-software/planet-scale-install
clean-up pscale / railway docs
2 parents caabc2e + b4e6ce0 commit fc5e030

3 files changed

Lines changed: 4 additions & 34 deletions

File tree

content/install.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ mysql://username:mypassword@localhost:3306/mydb
4242
yarn build
4343
```
4444

45-
### Create database tables
46-
47-
```bash
48-
yarn update-db
49-
```
50-
5145
This will also create a login account with username **admin** and password **umami**.
5246

5347
### Start the application

content/running-on-planetscale.mdx

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,14 @@
66

77
1. Fork the [https://github.com/umami-software/umami](https://github.com/umami-software/umami) project to your GitHub account.
88
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:
1010
```
1111
DATABASE_URL=mysql://username:password@host/umami-db?sslaccept=strict
12-
HASH_SALT=any-random-string
12+
SKIP_DB_CHECK=1
1313
```
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-
3614
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`).
3917
6. Follow the **Getting started** guide starting from the [Login](/docs/login) step and be sure to change the default password.
4018

4119
### Troubleshooting

content/running-on-railway.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ This initial deploy will fail until you follow the rest of these steps.
4343

4444
Adding the database should trigger a re-deploy, and clicking the app link should get you to the login page of your Umami instance.
4545

46-
Follow the remaining instructions above from [Create database tables](#create-database-tables) to finish setting up your Umami instance on Railway.
47-
4846
### Troubleshooting
4947

5048
If Railway states `Your project has no deploys` within your dashboard.

0 commit comments

Comments
 (0)