-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using Prisma file alongside Wasp (#2035)
- Loading branch information
Showing
172 changed files
with
4,373 additions
and
1,945 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
datasource db { | ||
provider = "sqlite" | ||
// Wasp requires that the url is set to the DATABASE_URL environment variable. | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
// Wasp requires the `prisma-client-js` generator to be present. | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
model User { | ||
id Int @id @default(autoincrement()) | ||
tasks Task[] | ||
} | ||
|
||
model Task { | ||
id Int @id @default(autoincrement()) | ||
description String | ||
isDone Boolean @default(false) | ||
user User? @relation(fields: [userId], references: [id]) | ||
userId Int? | ||
} |
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,23 @@ | ||
datasource db { | ||
provider = "sqlite" | ||
// Wasp requires that the url is set to the DATABASE_URL environment variable. | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
// Wasp requires the `prisma-client-js` generator to be present. | ||
generator client { | ||
provider = "prisma-client-js" | ||
} | ||
|
||
model User { | ||
id Int @id @default(autoincrement()) | ||
tasks Task[] | ||
} | ||
|
||
model Task { | ||
id Int @id @default(autoincrement()) | ||
description String | ||
isDone Boolean @default(false) | ||
user User? @relation(fields: [userId], references: [id]) | ||
userId Int? | ||
} |
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
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,10 @@ | ||
datasource db { | ||
provider = "sqlite" | ||
// Wasp requires that the url is set to the DATABASE_URL environment variable. | ||
url = env("DATABASE_URL") | ||
} | ||
|
||
// Wasp requires the `prisma-client-js` generator to be present. | ||
generator client { | ||
provider = "prisma-client-js" | ||
} |
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 |
---|---|---|
@@ -1,20 +1,16 @@ | ||
{{={= =}=}} | ||
|
||
datasource db { | ||
provider = "{= datasourceProvider =}" | ||
url = {=& datasourceUrl =} | ||
{=# dbExtensions =} | ||
extensions = {=& . =} | ||
{=/ dbExtensions =} | ||
} | ||
{=& datasourceSchema =} | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
{=# prismaPreviewFeatures =} | ||
previewFeatures = {=& . =} | ||
{=/ prismaPreviewFeatures =} | ||
} | ||
{=# generatorSchemas =} | ||
{=& . =} | ||
{=/ generatorSchemas =} | ||
|
||
{=# modelSchemas =} | ||
{=& . =} | ||
|
||
{=/ modelSchemas =} | ||
{=# enumSchemas =} | ||
{=& . =} | ||
|
||
{=/ enumSchemas =} |
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
Oops, something went wrong.