I ran a `gc deploy`, which involved a new field wi...
# prisma-whats-new
r
I ran a
gc deploy
, which involved a new field with a @migrationValue. I then created a new entry and ran
gc deploy
. The @migrationValue then got used again, overwriting the value I'd set on that new entry. To hopefully better explain:
Copy code
User [fields]:
— id
then I add a
verified: boolean
field with
@migrationValue(value: true)
. I run
gc deploy
and then create a new user with
verified: false
. New user:
Copy code
id: blah
verified: false
Then I run
gc deploy
again and when I fetch all users I see:
Copy code
id: blah
verified: true
Are @migrationValue's intended to overwrite values everytime they're run? This implies to me I'll have to remove all of my @migrationValue directives after running it once.
n
This implies to me I'll have to remove all of my @migrationValue directives after running it once.
correct. see https://github.com/graphcool/framework/issues/1263 for a proposal of an improved migrations API
r
Thanks for the link, great to hear you guys are on it with a more complete solution! With the existing
@migrationValue
system, do you have a recommended way of working in a Dev/QA environment and then moving to Prod? If I remove the @migrationValue directives now (I’ve not gone to Prod yet) I’ll have to keep track and then add them in again (and then remove them again). If I leave them in, they keep overwriting data whilst I’m testing things.
@nilan Or if you could point me to someone who you think could share a recommendation that’d also be great 👍