Skip to content

me: never try to migrate a column with @default(dbgenerated())#3153

Merged
tomhoule merged 1 commit intomainfrom
me/dbgenerated-regression
Aug 29, 2022
Merged

me: never try to migrate a column with @default(dbgenerated())#3153
tomhoule merged 1 commit intomainfrom
me/dbgenerated-regression

Conversation

@tomhoule
Copy link
Copy Markdown
Contributor

@tomhoule tomhoule added this to the 4.3.0 milestone Aug 29, 2022
@tomhoule tomhoule requested a review from a team as a code owner August 29, 2022 13:10
@tomhoule tomhoule force-pushed the me/dbgenerated-regression branch 3 times, most recently from cc31ec2 to e825b74 Compare August 29, 2022 14:21
@tomhoule tomhoule force-pushed the me/dbgenerated-regression branch from e825b74 to 587ec25 Compare August 29, 2022 14:35
let sql = r#"
CREATE TABLE "table" (
"id" TEXT NOT NULL,
"hereBeDragons" TEXT NOT NULL GENERATED ALWAYS AS ('this row ID is: '::text || "id") STORED,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you test on generated columns specifically?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the example from the issue

"chrono",
"datamodel-connector",
"diagnostics",
"dissimilar",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somebody pushed a faulty lock file, I'm getting the same diff with my branch...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that somebody is me, sowwy

@tomhoule tomhoule merged commit 7e4ac00 into main Aug 29, 2022
@tomhoule tomhoule deleted the me/dbgenerated-regression branch August 29, 2022 15:51
@Jolg42 Jolg42 modified the milestones: 4.3.0, 4.4.0 Aug 30, 2022
aqrln added a commit that referenced this pull request Apr 26, 2024
Empty `dbgenerated()` was fixed for supported types in
#3153 but that PR lacked
the corresponding changes for the unsupported types which this commit
adds.
Druue pushed a commit that referenced this pull request Apr 26, 2024
Empty `dbgenerated()` was fixed for supported types in
#3153 but that PR lacked
the corresponding changes for the unsupported types which this commit
adds.
Druue added a commit that referenced this pull request Apr 30, 2024
* se: support empty `dbgenerated()` in columns of unsupported types

Empty `dbgenerated()` was fixed for supported types in
#3153 but that PR lacked
the corresponding changes for the unsupported types which this commit
adds.

---------

Co-authored-by: Alexey Orlenko <alex@aqrln.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prisma v4 breaks support for empty dbgenerated() - invalid migration created with no schema change

4 participants