forked from prisma/prisma-engines
-
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.
fix(se): Empty dbgenerated() breaking for Unsupported() types (prisma…
…#4841) * se: support empty `dbgenerated()` in columns of unsupported types Empty `dbgenerated()` was fixed for supported types in prisma#3153 but that PR lacked the corresponding changes for the unsupported types which this commit adds. --------- Co-authored-by: Alexey Orlenko <alex@aqrln.net>
- Loading branch information
Showing
5 changed files
with
61 additions
and
13 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
21 changes: 21 additions & 0 deletions
21
...igration-tests/tests/single_migration_tests/postgres/empty_unsupported_dbgenerated.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,21 @@ | ||
// tags=postgres | ||
// exclude=cockroachdb | ||
|
||
datasource testds { | ||
provider = "postgresql" | ||
url = env("TEST_DATABASE_URL") | ||
} | ||
|
||
model table { | ||
id String @id | ||
hereBeDragons Unsupported("tsvector")? @default(dbgenerated()) | ||
} | ||
|
||
// Expected Migration: | ||
// -- CreateTable | ||
// CREATE TABLE "table" ( | ||
// "id" TEXT NOT NULL, | ||
// "hereBeDragons" tsvector, | ||
// | ||
// CONSTRAINT "table_pkey" PRIMARY KEY ("id") | ||
// ); |
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