Skip to content

Commit

Permalink
se: test reproduction for CREATE DEFAULT introspection on mssql (#4147)
Browse files Browse the repository at this point in the history
We have multiple issues related to crashes with CREATE DEFAULT, but this
one prompted this reproduction: prisma/prisma#14208

We _cannot_ reproduce the crash, and the default is not introspected.
So the bug is not confirmed.
  • Loading branch information
tomhoule committed Aug 21, 2023
1 parent b288d5a commit 2804dc9
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
-- tags=mssql2017

CREATE TABLE a (
id INT IDENTITY,
savings INT,
CONSTRAINT [A_pkey] PRIMARY KEY (id)
);

EXEC('CREATE DEFAULT NEARLY_NOTHING AS 0');
EXEC('sp_bindefault ''NEARLY_NOTHING'', ''a.savings''');
/*
generator js {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlserver"
url = env("DATABASE_URL")
}
model a {
id Int @id(map: "A_pkey") @default(autoincrement())
savings Int?
}
*/

0 comments on commit 2804dc9

Please sign in to comment.