Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migration failure if a DML function refers to required property. #8402

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dnwpark
Copy link
Contributor

@dnwpark dnwpark commented Feb 26, 2025

Splits altering DML functions into a paired DeleteFunction and CreateFunction. This fixes issues when adding/removing required, renaming, or changing the type of a pointer in the same migration as the function change.

For example, when migrating from:

  type Foo { required a: int64; }
  function insert_foo() -> Foo using ( insert Foo { a := 1 } );

to:

  type Foo {}
  function insert_foo() -> Foo using ( insert Foo {} );

close #8377

Copy link

github-actions bot commented Feb 26, 2025

Docs preview deploy

✅ Successfully deployed docs preview for commit f97c8d1:

https://edgedb-docs-pdd6z6m02-edgedb.vercel.app

(Last updated: Feb 26, 2025, 23:00:50 UTC)

@dnwpark dnwpark force-pushed the dml-function-migrate branch 2 times, most recently from cdd91e5 to bda1726 Compare February 26, 2025 23:40
@dnwpark dnwpark force-pushed the dml-function-migrate branch from bda1726 to 472729e Compare February 27, 2025 18:44
@dnwpark dnwpark force-pushed the dml-function-migrate branch from 472729e to 0d9b882 Compare February 27, 2025 19:39
@dnwpark dnwpark marked this pull request as ready for review February 27, 2025 20:20
@dnwpark dnwpark added the to-backport-6.x PRs that *should* be backported to 6.x label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-backport-6.x PRs that *should* be backported to 6.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot resolve migration dropping a required property if a DML function is involved
1 participant