forked from redwoodjs/redwood
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename default datasource (redwoodjs#1941)
* Rename default datasource When looking in the documentation for experimental features (For example using DB native types) you need to add a previewFeatures flag to the Generate block, and then in the docs they use `@db.*` everywhere. So as an example if you'd want to use the Postgres native Date field you get something like this: `createdAt DateTime @default(now()) @db.Date` Since we use `DS`as a default datasource it can trip users up a bit since `@DS.Date` is not a valid Prisma line (Somehow they don't like the uppercase datasource). So if we would already rename it to `datasource db {}` we would make it easier for users in the future * rename prisma datasource: docs, test, fixture, mod Co-authored-by: David Price <[email protected]>
- Loading branch information
1 parent
5d2aff1
commit a7e975e
Showing
6 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/cli/src/commands/generate/scaffold/__tests__/fixtures/schema.prisma
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,4 +1,4 @@ | ||
datasource DS { | ||
datasource db { | ||
provider = "postgresql" | ||
url = env("DB_HOST") | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
packages/cli/src/commands/generate/sdl/__tests__/fixtures/schema.prisma
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,4 +1,4 @@ | ||
datasource DS { | ||
datasource db { | ||
provider = "mysql" | ||
url = env("DB_HOST") | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
packages/cli/src/commands/generate/service/__tests__/fixtures/schema.prisma
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,4 +1,4 @@ | ||
datasource DS { | ||
datasource db { | ||
provider = "postgresql" | ||
url = env("DB_HOST") | ||
} | ||
|
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,4 +1,4 @@ | ||
datasource DS { | ||
datasource db { | ||
provider = "sqlite" | ||
url = env("DB_HOST") | ||
} | ||
|
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,4 +1,4 @@ | ||
datasource DS { | ||
datasource db { | ||
provider = "sqlite" | ||
url = env("DATABASE_URL") | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
tasks/e2e/cypress/integration/01-tutorial/codemods/Step4_1_DbSchema.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