title: Change data in migration Up method - Entity Framework
body: <p>I have added a new property to my existing model. It's a bool property with a default value of true. There are existing data in this table and I would like to set one specific row's new property to false right after creating the new field, in the Up method.</p>
  <pre><code>public override void Up()
  {
      AddColumn(&quot;dbo.RequestValidationErrors&quot;, &quot;IsBreaking&quot;,
           c =&gt; c.Boolean(nullable: false));
      using (Context ctx = new Context())
      {
          var validation = 
              ctx.RequestValidationErrorSet
              .FirstOrDefault
                  (x =&gt; x.WordCode == &quot;RequestValidationError.MoreThanOneItemFound&quot;);
              if (validation != null)
              {
                  validation.IsBreaking = false;
                  ctx.SaveChanges();
              }
          }
      }
  }
  </code></pre>
  <p>This way EF throws an error during saying</p>
  <blockquote>
  <p>System.InvalidOperationException: The model backing the
  'DbContext' context has changed since the database was created.
  Consider using Code First Migrations to update the database</p>
  </blockquote>
  <p>Is it possible to change the database here or should I do it elsewhere?</p>