-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: adjust seeding script to have resolved translations for roles * chore: remove console log * docs: write documentation for seeding database * docs: add missing subpages under dev guide in overview * docs: add explanation how to execute seeding script * chore: reduce num entities to 15
- Loading branch information
Showing
6 changed files
with
182 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Seeding database | ||
|
||
You can find a seeding script (`seed-db.ts`) on the root level of the monorepo to seed the Postgres database that is used by the Essencium backend. The seeding script only works out of the box with the Essencium Backend. When using a different backend, it must be adjusted accordingly. | ||
You also need to pass the admin username and password into the `CONFIG` constant (in `seed-db.ts`) to authenticate. To run the script, just execute `pnpm seed-db` on root level. | ||
|
||
The script creates by default 20 new users and roles and deletes existing roles and users beforehand except the admin user. The number of users and roles, the script should create, can be adjusted by changing the value in `CONFIG.NUM_ENTITIES`. | ||
|
||
The output should look like this: | ||
|
||
``` | ||
🌱 Started seeding database | ||
➡ Setting up axios instance | ||
➡ Authenticating | ||
➡ Deleting existing users and roles | ||
➡ Creating new roles and users | ||
✅ Seeding successful | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5887bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
app – ./packages/app
app-essencium-frontend.vercel.app
essencium-frontend.vercel.app
app-git-main-essencium-frontend.vercel.app
staging.essencium.dev
5887bea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
docs – ./packages/docs
docs.essencium-frontend.vercel.app
docs-essencium-frontend.vercel.app
docs-git-main-essencium-frontend.vercel.app
docs.essencium.dev