IF NOT EXISTS (SELECT 1 FROM sys.tables WHERE name = 'pxp_ccda_agents_info')
CREATE TABLE [dbo].[pxp_ccda_agents_info](
	[row_id] [uniqueidentifier] NOT NULL,
	[practice_id] [char](4) NULL,
	[file_checksum] [nvarchar](40) NOT NULL,
	[agent_name] [varchar](100) NOT NULL,
	[created_by] [int] NOT NULL,
	[create_timestamp] DATETIME NOT NULL DEFAULT GETDATE(),
	[modified_by] INT NOT NULL,
	[modify_timestamp] DATETIME NOT NULL DEFAULT GETDATE(),
	[row_timestamp] [timestamp] NOT NULL
)ON NEXTGEN_CORE;
GO

EXECUTE NG_INDEX_MAINT
@PI_TABLE_NAME = 'pxp_ccda_agents_info',
@PI_INDEX_NAME = 'PK_pxp_ccda_agents_info',
@PI_INDEX_COLUMNS = 'row_id',
@PI_INCLUDED_COLUMNS = NULL,
@PI_PRIMARY_IND = 'Y',
@PI_CLUSTERED_IND = 'N',
@PI_UNIQUE_IND = 'Y',
@PI_NG_SYSTEM_IND = 'Y',
@PI_FULLTEXT_IND = 'N',
@PI_FILL_FACTOR = 90,
@PI_PRINT_IND = 'N',
@PI_DROP_INDEX = 'N'
GO