IF EXISTS(SELECT 1 FROM sys.columns 
          WHERE Name = N'DOCUMENTFOLDERID'
          AND Object_ID = Object_ID(N'LD0P0SHORTCUTLINKS'))
BEGIN
	ALTER TABLE LD0P0SHORTCUTLINKS DROP COLUMN DOCUMENTFOLDERID
END
GO

IF NOT EXISTS(SELECT 1 FROM sys.columns 
          WHERE Name = N'DOCUMENTFOLDERIDS'
          AND Object_ID = Object_ID(N'LD0P0SHORTCUTLINKS'))
BEGIN
	ALTER TABLE LD0P0SHORTCUTLINKS ADD DOCUMENTFOLDERIDS VARCHAR(50) NULL
END
GO

CREATE OR ALTER VIEW LD0V0SHORTCUTLINKS
	AS SELECT * FROM LD0P0SHORTCUTLINKS
GO
GRANT ALL ON LD0V0SHORTCUTLINKS TO LD0ROANV
GO

