rajit
12/17/2017, 3:14 PMgc 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:
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:
id: blah
verified: false
Then I run gc deploy
again and when I fetch all users I see:
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.nilan
12/18/2017, 9:10 AMThis 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
rajit
12/18/2017, 10:29 AM@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.rajit
12/18/2017, 4:01 PM