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

No prompt for backfill, double RESET EXPRESSION when changing from computed to hard required link #1322

Open
jackfischer opened this issue May 8, 2024 · 2 comments

Comments

@jackfischer
Copy link

jackfischer commented May 8, 2024

  • EdgeDB Version: 4.7 and 5.3
  • EdgeDB CLI Version: 5.1.0
  • OS Version: macos

Steps to Reproduce:

Make the following change from computed to hard link. CLI doesn't prompt for a backfill expression for the link like it would when introducing a normal required - of course migration then fails if you have any data.

module default {

    type A {}

    type B {
        someA: A;
        # required link a := assert_exists(.someA);
        required link a: A;
    }

}
$ edgedb migration create
did you alter link 'a' of object type 'default::B'? [y,n,l,c,b,s,q,?]
> l
The following DDL statements will be applied:
    ALTER TYPE default::B {
        ALTER LINK a {
            RESET EXPRESSION;
            RESET EXPRESSION;
            RESET CARDINALITY;
            SET TYPE default::A;
        };
    };
did you alter link 'a' of object type 'default::B'? [y,n,l,c,b,s,q,?]
> y
Created /Users/jack/dev/edgedbmay8/dbschema/migrations/00002-m1ybov2.edgeql, id: m1ybov226ukysh5hqbmjqjh47mtrpdnim7kkfpufplq5f6qv7tzziq
@jackfischer
Copy link
Author

Little weird that it does RESET EXPRESSION; twice but that probably doesn't matter.

@raddevon
Copy link
Contributor

raddevon commented May 8, 2024

Hey, @quinchs. Does this need to be here in edgedb-cli, or does it need to transfer to edgedb?

@jackfischer jackfischer changed the title Prompt for backfill when changing from computed to hard required link Prompt for backfill, double RESET EXPRESSION when changing from computed to hard required link May 16, 2024
@jackfischer jackfischer changed the title Prompt for backfill, double RESET EXPRESSION when changing from computed to hard required link No prompt for backfill, double RESET EXPRESSION when changing from computed to hard required link May 16, 2024
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

No branches or pull requests

2 participants