
--Migration_RCCP_20230727_185713.txt
DECLARE @var0 nvarchar(128)
SELECT @var0 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.Vehicles')
AND col_name(parent_object_id, parent_column_id) = 'BranchId';
IF @var0 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[Vehicles] DROP CONSTRAINT [' + @var0 + ']')
ALTER TABLE [dbo].[Vehicles] ALTER COLUMN [BranchId] [bigint] NOT NULL
DECLARE @var1 nvarchar(128)
SELECT @var1 = name
FROM sys.default_constraints
WHERE parent_object_id = object_id(N'dbo.Vehicles')
AND col_name(parent_object_id, parent_column_id) = 'DriverId';
IF @var1 IS NOT NULL
    EXECUTE('ALTER TABLE [dbo].[Vehicles] DROP CONSTRAINT [' + @var1 + ']')
ALTER TABLE [dbo].[Vehicles] ALTER COLUMN [DriverId] [bigint] NOT NULL
