/*
	CEP-89 - Quote Final (Notes not saving)

	Notes in PDF quote get truncated to 300 characters.
	This will set the max length of pal_Sales.comments to 1000.

	1.6.1_112_PL_CAPI1_CEP-89.sql
*/
DECLARE @maxLength int = (SELECT TOP 1 CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'pal_Sales' AND COLUMN_NAME = 'comments')
IF @maxLength < 1000
BEGIN
	ALTER TABLE pal_Sales
	ALTER COLUMN comments VARCHAR(1000) NULL
END