Skip to content

Commit c800bc7

Browse files
committed
docs(schema.prisma): add detailed comments for better understanding of the schema
refactor(schema.prisma): uncomment DEV_DATABASE_URL and DEV_DIRECT_URL for development database usage style(schema.prisma): remove comment from case_status field for cleaner code
1 parent d70209b commit c800bc7

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

prisma/schema.prisma

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
1+
// Prisma Client Python is a next-generation ORM built on top of Prisma that has been designed from the ground up for ease of use and correctness. Prisma is a TypeScript ORM with zero-cost type safety for your database, although don't worry, Prisma Client Python interfaces with Prisma using Rust, you don't need Node or TypeScript.
2+
3+
// For more information on how to use Prisma Client Python, please refer to the documentation:
4+
// https://www.prisma.io/docs/prisma-client-py
5+
6+
// For more information on the Prisma schema, please refer to the documentation:
7+
// https://www.prisma.io/docs/orm/prisma-schema
8+
19
datasource db {
2-
provider = "postgresql"
3-
// url = env("PROD_DATABASE_URL")
4-
// directUrl = env("PROD_DIRECT_URL")
10+
provider = "postgresql"
11+
12+
// Uncomment the following lines to use a development database
513
url = env("DEV_DATABASE_URL")
614
directUrl = env("DEV_DIRECT_URL")
15+
16+
// Uncomment the following lines to use a production database
17+
// url = env("PROD_DATABASE_URL")
18+
// directUrl = env("PROD_DIRECT_URL")
719
}
820

21+
// Docs: https://prisma-client-py.readthedocs.io/en/stable/reference/client/
22+
// Docs: https://prisma-client-py.readthedocs.io/en/stable/reference/config/#recursive-type-depth
923
generator client {
10-
// Prisma Python client provider
1124
provider = "prisma-client-py"
12-
// Asynchronous interface to use
1325
interface = "asyncio"
14-
// Recursive type depth not limited (-1)
1526
recursive_type_depth = -1
1627
}
1728

29+
// Docs: https://www.prisma.io/docs/orm/reference/prisma-schema-reference#enum
1830
enum CaseType {
1931
BAN
2032
UNBAN
@@ -28,6 +40,8 @@ enum CaseType {
2840
UNJAIL
2941
}
3042

43+
// Docs: https://www.prisma.io/docs/orm/prisma-schema/data-model/models#defining-models
44+
// Docs: https://www.prisma.io/docs/orm/prisma-schema/data-model/models#defining-attributes
3145
model Guild {
3246
guild_id BigInt @id
3347
guild_joined_at DateTime? @default(now())
@@ -73,7 +87,7 @@ model GuildConfig {
7387

7488
model Case {
7589
case_id BigInt @id @default(autoincrement())
76-
case_status Boolean? @default(true) // True for active, false for inactive
90+
case_status Boolean? @default(true)
7791
case_type CaseType
7892
case_reason String
7993
case_moderator_id BigInt

0 commit comments

Comments
 (0)