When adding a migration for changes to the database, update the migration class to set the default value before updating the database:
AddColumn("Jobs", "IsAdvertisingRequired", c => c.Boolean(nullable: false, defaultValueSql: "0"));
This will translate into the following SQL:
ALTER TABLE [Jobs] ADD DEFAULT ((0)) FOR [IsAdvertisingRequired] GO
David clarke
source share