title: Adding new column using Update-Database in Entity Framework Core
body: <p>May be i'm missing something very obvious. But i haven't been able to figure out a way to add a new column to an existing table/model in EF Core.</p>
  
  <p>This is the documentation that I'm following: <a href="https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/powershell" rel="noreferrer">https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/powershell</a></p>
  
  <p>And this is what i have done so far:</p>
  
  <ol>
  <li>Created migration using this command: "Add-Migration -Name CodingSoldierDbContextMigration -OutputDir Migrations -Context CodingSoldierDbContext"</li>
  <li>Updated database using the command: "Update-Database -Migration CodingSoldierDbContextMigration -Context CodingSoldierDbContext". Tables got created in the Database.</li>
  <li>Now i need to add a new column to an existing table. I add that column to the model in the .cs file. And i remove the existing migration: "Remove-Migration -Force -Context CodingSoldierDbContext"</li>
  <li>Now i re-run the commands in steps 1 and 2. Add-Migration works and migration gets created. But Update-Database fails with the error: "There is already an object named 'AspNetRoles' in the database." which means the table is already present in the database which makes sense. </li>
  </ol>
  
  <p>So how do i update an already existing table table ? 
  2 ways i can think of are:</p>
  
  <ol>
  <li>Drop the database. Create migration and update database. But all data will be gone.</li>
  <li>Add column in the model. Manually update the Table using a SQL script to add the new column. </li>
  </ol>
  
  <p>But i feel there should be a better way to do this.</p>