forked from PolarisPyra/daphnis
66 lines
1.5 KiB
Markdown
66 lines
1.5 KiB
Markdown
|
|
|
|
Needs BunJS and a Mysql DB
|
|
|
|
|
|
1 - create a mysql database called lachesis
|
|
|
|
make a .env in the root directory containing the following (be sure to use your own data)
|
|
|
|
DATABASE_URL="mysql://root:password@localhost:3306/lachesis"
|
|
DATABASE_AIME_URL = "mysql://root:password@localhost:3306/aime"
|
|
|
|
---
|
|
2 - delete the migrations folder(s) inside schemas/artemis and schemas/lachesis
|
|
|
|
----
|
|
3 - run the below
|
|
|
|
$ `bun db:init`
|
|
|
|
What it does:
|
|
|
|
It will create a empty data base for lachesis and pull your existing artemis one into its own schema via introspection.
|
|
|
|
`"db:init": "npx prisma migrate dev --name init --schema prisma/schemas lachesis/schema.prisma; npx prisma db pull --schema prisma/schemas/artemis/schema.prisma"`
|
|
|
|
---
|
|
|
|
4 - run the below
|
|
|
|
$ `bun lachesis:generate`
|
|
|
|
What it does:
|
|
|
|
generates the schema output
|
|
|
|
`"lachesis:generate": "prisma generate --schema=./prisma/schemas/lachesis/schema.prisma"`
|
|
|
|
---
|
|
|
|
5 - run the below
|
|
|
|
generates the schema output
|
|
|
|
$ `bun aretmis:generate`
|
|
|
|
What it does:
|
|
|
|
`"artemis:generate": "prisma generate --schema=./prisma/schemas/artemis/schema.prisma"`
|
|
|
|
---
|
|
|
|
6 - start lachesis
|
|
|
|
$ `bun run dev`
|
|
|
|
What it does:
|
|
|
|
`"dev": "next dev",`
|
|
|
|
You can look at the package.json to figure out how to migrate lachesis if you have the desire to make changes.
|
|
|
|
If you download the files as is you should just need to update the env and do a migrate to your db for lachesis, check your database after to make sure all the schemas are there.
|
|
|
|
`"lachesis:migrate": "prisma migrate dev --schema=./prisma/schemas/lachesis/schema.prisma",`
|