Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* directUrl: types and helpers * directUrl: use direct url when possible/needed * directUrl: update error message to reflect changes * directUrl: add test for migrate reset, fix some issues * directUrl: rename getDirectUrl to getEffectiveUrl * Update packages/migrate/src/utils/ensureDatabaseExists.ts * Update packages/migrate/src/utils/ensureDatabaseExists.ts Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com>
- Loading branch information
1 parent
5353900
commit b3963d5
Showing
10 changed files
with
74 additions
and
17 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
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
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
...rc/__tests__/fixtures/reset-directurl/prisma/migrations/20201013134654_init/migration.sql
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,5 @@ | ||
-- CreateTable | ||
CREATE TABLE "Blog" ( | ||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
"viewCount20" INTEGER NOT NULL | ||
); |
15 changes: 15 additions & 0 deletions
15
packages/migrate/src/__tests__/fixtures/reset-directurl/prisma/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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
datasource my_db { | ||
provider = "sqlite" | ||
url = "file:invalidfile.db" | ||
directUrl = "file:dev.db" | ||
} | ||
|
||
generator client { | ||
provider = "prisma-client-js" | ||
output = "@prisma/client" | ||
} | ||
|
||
model Blog { | ||
id Int @id | ||
viewCount20 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