daphnis/README.md

54 lines
994 B
Markdown
Raw Normal View History

2024-06-29 05:22:22 +00:00
Needs BunJS and a Mysql DB
2024-08-17 20:41:38 +00:00
1 - create a mysql database called daphnis
2024-06-29 05:22:22 +00:00
2024-08-23 18:06:23 +00:00
2a - create .env file from the example.env
2024-08-17 20:41:38 +00:00
2 - delete the migrations and generated folder(s) inside schemas/artemis and schemas/daphnis
2024-06-29 05:22:22 +00:00
2024-08-17 20:41:38 +00:00
---
2024-06-29 05:22:22 +00:00
3 - run the below
$ `bun db:init`
What it does:
2024-08-17 20:41:38 +00:00
It will create a empty data base for daphnis and pull your existing artemis one into its own schema via introspection.
2024-06-29 05:22:22 +00:00
2024-08-17 20:41:38 +00:00
`"db:init": "npx prisma migrate dev --name init --schema prisma/schemas daphnis/schema.prisma; npx prisma db pull --schema prisma/schemas/artemis/schema.prisma"`
2024-06-29 05:22:22 +00:00
---
4 - run the below
$ `bun daphnis:generate`
2024-06-29 05:22:22 +00:00
What it does:
generates the schema output
2024-08-17 20:41:38 +00:00
`"daphnis:generate": "prisma generate --schema=./prisma/schemas/daphnis/schema.prisma"`
2024-06-29 05:22:22 +00:00
---
5 - run the below
generates the schema output
$ `bun aretmis:generate`
What it does:
`"artemis:generate": "prisma generate --schema=./prisma/schemas/artemis/schema.prisma"`
---
2024-08-17 20:41:38 +00:00
6 - start daphnis
2024-06-29 05:22:22 +00:00
$ `bun run dev`
What it does:
`"dev": "next dev",`