CREATE TABLE [dbo].[MIG_EO_RT_STP_DOC](
	[EO_ID] [varchar](30) NOT NULL,
	[ROUTE_ID] [varchar](30) NOT NULL,
	[STEP_ID] [varchar](15) NOT NULL,
	[DOC_KEY] [varchar](40) NOT NULL,
	[REVISION] [varchar](6) NOT NULL,
	[RESPONSE_DATE] [int] NOT NULL,
	[RESPONSE_TIME] [int] NOT NULL,
	[GUID][varchar](36) NOT NULL, 
	[ZZ_ID] [int] NOT NULL,
	[REJECTION_TYPE] [varchar](10) NOT NULL,
	[RESPONSE] [smallint] NOT NULL,
	[APPROVAL_STATUS] [smallint] NOT NULL,
	[REJECTION_STATUS] [smallint] NOT NULL,
	[UPDATED_ON] [datetime2](7) NOT NULL,
 CONSTRAINT [PK_MIG_EO_RT_STP_DOC_IDX] PRIMARY KEY CLUSTERED 
(
	[EO_ID] ASC,
	[ROUTE_ID] ASC,
	[STEP_ID] ASC,
	[DOC_KEY] ASC,
	[REVISION] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

CREATE UNIQUE NONCLUSTERED INDEX [MIG_EO_RT_STP_DOC_IDX1] ON [dbo].[MIG_EO_RT_STP_DOC]
(
	[GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [MIG_EO_RT_STP_DOC_IDX2] ON [dbo].[MIG_EO_RT_STP_DOC]
(
	[EO_ID] ASC,
	[ROUTE_ID] ASC,
	[STEP_ID] ASC,
	[DOC_KEY] ASC,
	[REVISION] ASC,
	[RESPONSE_DATE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


CREATE NONCLUSTERED INDEX [MIG_EO_RT_STP_DOC_IDX3] ON [dbo].[MIG_EO_RT_STP_DOC]
(
	[DOC_KEY] ASC,
	[REVISION] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


