IF COL_LENGTH('dbo.asr_bas_crnp', 'bay') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_bas_crnp]
        ADD [bay] INT NULL;

    EXEC sys.sp_addextendedproperty
        @name = N'MS_Description', @value = N'当前列',
        @level0type = N'SCHEMA', @level0name = N'dbo',
        @level1type = N'TABLE',  @level1name = N'asr_bas_crnp',
        @level2type = N'COLUMN', @level2name = N'bay';
END;

IF COL_LENGTH('dbo.asr_bas_crnp', 'level') IS NULL
BEGIN
    ALTER TABLE [dbo].[asr_bas_crnp]
        ADD [level] INT NULL;

    EXEC sys.sp_addextendedproperty
        @name = N'MS_Description', @value = N'当前层',
        @level0type = N'SCHEMA', @level0name = N'dbo',
        @level1type = N'TABLE',  @level1name = N'asr_bas_crnp',
        @level2type = N'COLUMN', @level2name = N'level';
END;
