ASP MVC update-database error: Cannot insert the value NULL into column

Cannot insert the value NULL into column 'AuthorId', table 'bookbuyAoMnHapSN.dbo.Books'; column does not allow nulls. UPDATE fails.
The statement has been terminated.

Source of Error: A row in the a column being changed/renamed has a NULL value, thus this expression in the migration class will return the error message.

AlterColumn("dbo.Books", "AuthorId", c => c.Int(nullable: false));

Solution: Edit the row with a NULL value for that column

Now we can proceed with update-database.

PM> update-database -Verbose
Using StartUp project 'BookBuyersGuideMVC'.
Using NuGet project 'BookBuyersGuideMVC'.
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
Target database is: 'bookbuyAoMnHapSN' (DataSource:,1433, Provider: System.Data.SqlClient, Origin: Configuration).
Applying code-based migrations: [201404010613006_firstAdd].
Applying code-based migration: 201404010613006_firstAdd.
ALTER TABLE [dbo].[Books] DROP CONSTRAINT [FK_dbo.Books_dbo.Authors_Author_ID]
DROP INDEX [IX_Author_ID] ON [dbo].[Books]
EXECUTE sp_rename @objname = N'dbo.Books.Author_ID', @newname = N'AuthorId', @objtype = N'COLUMN'
ALTER TABLE [dbo].[Books] ALTER COLUMN [AuthorId] [int] NOT NULL
ALTER TABLE [dbo].[Books] ADD CONSTRAINT [FK_dbo.Books_dbo.Authors_AuthorId] FOREIGN KEY ([AuthorId]) REFERENCES [dbo].[Authors] ([ID]) ON DELETE CASCADE
CREATE INDEX [IX_AuthorId] ON [dbo].[Books]([AuthorId])
[Inserting migration history record]
Running Seed method.