IF COL_LENGTH('dbo.asr_wrk_mast', 'plate_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast]
        ADD [plate_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_mast', 'train_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast]
        ADD [train_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_mast', 'freq_type') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast]
        ADD [freq_type] INT NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_mast', 'cube_number') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast]
        ADD [cube_number] DECIMAL(18, 4) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_mast_log', 'plate_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast_log]
        ADD [plate_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_mast_log', 'train_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast_log]
        ADD [train_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_mast_log', 'freq_type') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast_log]
        ADD [freq_type] INT NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_mast_log', 'cube_number') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_mast_log]
        ADD [cube_number] DECIMAL(18, 4) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl', 'plate_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl]
        ADD [plate_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl', 'train_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl]
        ADD [train_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl', 'freq_type') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl]
        ADD [freq_type] INT NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl', 'cube_number') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl]
        ADD [cube_number] DECIMAL(18, 4) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl_log', 'plate_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl_log]
        ADD [plate_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl_log', 'train_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl_log]
        ADD [train_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl_log', 'freq_type') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl_log]
        ADD [freq_type] INT NULL;
END
GO

IF COL_LENGTH('dbo.asr_wrk_detl_log', 'cube_number') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_wrk_detl_log]
        ADD [cube_number] DECIMAL(18, 4) NULL;
END
GO

IF COL_LENGTH('dbo.asr_loc_detl', 'plate_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_loc_detl]
        ADD [plate_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_loc_detl', 'train_no') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_loc_detl]
        ADD [train_no] NVARCHAR(100) NULL;
END
GO

IF COL_LENGTH('dbo.asr_loc_detl', 'freq_type') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_loc_detl]
        ADD [freq_type] INT NULL;
END
GO

IF COL_LENGTH('dbo.asr_loc_detl', 'cube_number') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_loc_detl]
        ADD [cube_number] DECIMAL(18, 4) NULL;
END
GO
