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

    EXEC sys.sp_addextendedproperty
        @name = N'MS_Description', @value = N'当前堆垛机号',
        @level0type = N'SCHEMA', @level0name = N'dbo',
        @level1type = N'TABLE',  @level1name = N'asr_row_lastno',
        @level2type = N'COLUMN', @level2name = N'current_crn_no';
END;
