I am using an Empty Migration to update a stored procedure in my database. The stored procedure is a custom stored proc that was added in the intial creation of the database.
I have discovered the 'AlterStoredProcedure' method in the DbMigration class and this works to update the stored procedure, however I have to pass through the parameters of the stored procedure and I want to set the default value of a boolean and some ints to null, but I can't seem to get this to work.
AlterStoredProcedure(
name: "[dbo].[FT_People_PersonFullTextSearch]",
parametersAction:
p => new {
searchTerm = p.String(600),
isArchived = p.Boolean(false),
isActive = p.Boolean(null),
genderFilter = p.Int(null),
rankingFilter = p.Int(null)
},
body: "the body of my stored proc....");
The above code produces
ALTER PROCEDURE [dbo].[FT_People_PersonFullTextSearch]
@searchTerm [nvarchar](600),
@isArchived [bit] = 0,
@isActive [bit],
@genderFilter [int],
@rankingFilter [int]
AS
BEGIN
instead of
ALTER PROCEDURE [dbo].[FT_People_PersonFullTextSearch]
@searchTerm nvarchar(600),
@isArchived bit = 0,
@isActive bit = null,
@genderFilter int = null,
@rankingFilter int = null
AS
BEGIN
Does anyone know how to get the parameters to produce @isActive bit = null
?