IF	OBJECT_ID('PRC_FORN_DEV_POLITICA') IS NULL
begin

	CREATE TABLE [dbo].[PRC_FORN_DEV_POLITICA](
		[CD_EMP] [int] NOT NULL,
		[CD_POLITICA] [int] IDENTITY(1,1) NOT NULL,
		[DS_POLITICA] [varchar](100) NOT NULL,
		[POLITICA_REALIZA_RESSARCIMENTO] [int] NOT NULL,
		[POLITICA_EXIGE_NF_DEV] [int] NOT NULL,
		[FLAG_ACEITA_DEV_ACIMA_1_ANO] [tinyint] NOT NULL,
		[FLAG_FORN_RECOLHE_MERCADORIA] [tinyint] NOT NULL,
		[QTDE_DIAS_RECOLHIMENTO] [smallint] NOT NULL,
		[PERCENTUAL_RESSARCIMENTO] [money] NOT NULL,
		[TIPO_RECOLHIMENTO] [tinyint] NOT NULL,
		[TIPO_RESSARCIMENTO] [tinyint] NOT NULL,
	 CONSTRAINT [PK_PRC_FORN_DEV_POLITICA] PRIMARY KEY CLUSTERED 
	(
		[CD_EMP] ASC,
		[CD_POLITICA] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY]

	SET ANSI_PADDING OFF
	

	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_CD_EMP]  DEFAULT ((1)) FOR [CD_EMP]
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_POLITICA_REALIZA_RESSARCIMENTO]  DEFAULT ((0)) FOR [POLITICA_REALIZA_RESSARCIMENTO]	
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_POLITICA_EXIGE_NF_DEV]  DEFAULT ((0)) FOR [POLITICA_EXIGE_NF_DEV]
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_FLAG_ACEITA_DEV_ACIMA_1_ANO]  DEFAULT ((1)) FOR [FLAG_ACEITA_DEV_ACIMA_1_ANO]	
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_FLAG_FORN_RECOLHE_MERCADORIA]  DEFAULT ((0)) FOR [FLAG_FORN_RECOLHE_MERCADORIA]	
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_QTDE_DIAS_RECOLHIMENTO]  DEFAULT ((0)) FOR [QTDE_DIAS_RECOLHIMENTO]
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_PERCENTUAL_RESSARCIMENTO]  DEFAULT ((0)) FOR [PERCENTUAL_RESSARCIMENTO]
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_TIPO_RECOLHIMENTO]  DEFAULT ((0)) FOR [TIPO_RECOLHIMENTO]
	ALTER TABLE [dbo].[PRC_FORN_DEV_POLITICA] ADD  CONSTRAINT [DF_PRC_FORN_DEV_POLITICA_TIPO_RESSARCIMENTO]  DEFAULT ((0)) FOR [TIPO_RESSARCIMENTO]
	
END