
IF((SELECT COUNT(*) FROM dbo.pal_Surface WHERE name = 'GroupPostbox') = 1)
BEGIN

UPDATE pal_Surface SET isPublished = 1 WHERE name = 'GroupPostbox';
END;

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'publ_GroupPostbox')
BEGIN

/****** Object:  Table [dbo].[publ_GroupPostbox]    Script Date: 2020/06/01 14:08:44 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON

CREATE TABLE [dbo].[publ_GroupPostbox](
	[itemID] [int] NOT NULL,
	[isActive] [bit] NULL,
	[surfaceId] [int] NOT NULL,
	[GroupPostbox_GroupPostboxDetails_AssessmentMaterials] [varchar](max) NULL,
	[GroupPostbox_GroupPostboxDetails_AssessmentRecords] [varchar](max) NULL,
	[GroupPostbox_GroupPostboxDetails_Correspondence] [varchar](max) NULL,
	[GroupPostbox_GroupPostboxDetails_LinkedSchools] [varchar](max) NULL,
	[GroupPostbox_GroupPostboxDetails_GroupName] [varchar](max) NULL,
	[GroupPostbox_GroupPostboxDetails_GroupType] [int] NULL,
	[GroupPostbox_GroupPostboxDetails_Description] [varchar](max) NULL,
	[recId] [int] IDENTITY(1,1) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[recId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

END;
