USE [TryNFeOnline]
GO

ALTER TABLE [dbo].[NFProduto] ADD 
[valorAcrescimosCustoImportacaoXML] [decimal] (18,4) NULL,
[valorDescontosCustoImportacaoXML] [decimal] (18,4) NULL
GO
CREATE NONCLUSTERED INDEX [IX_OSE_idOrdemServico] ON [dbo].[OrdemServicoEncerrada]
(
	[idOrdemServico] ASC
) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OSF_idOrdemServico] ON [dbo].[OrdemServicoFaturada]
(
	[idOrdemServico] ASC
) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OrdemServicoMaquinasEquipamentos_idOrdemServico] ON [dbo].[OrdemServicoMaquinasEquipamentos]
(
	[idOrdemServico] ASC
) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OSPS_idOrdemServico] ON [dbo].[OrdemServicoPetShop]
(
	[idOrdemServico] ASC
) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OSV_idOrdemServicoVeiculo] ON [dbo].[OrdemServicoVeiculo]
(
	[idOrdemServico] ASC
) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_OrdemServicoProduto_idOrdemServico] ON [dbo].[OrdemServicoProduto]
(
	[idOrdemServico] ASC
) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_idOrdemServico] ON [dbo].[OrdemServicoServico]
(
	[idOrdemServico] ASC
) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
IF COL_LENGTH('dbo.CartaoLote', 'historico') IS NULL
BEGIN
    ALTER TABLE [dbo].[CartaoLote] ADD
	[historico] [varchar] (max) COLLATE Latin1_General_CI_AS NULL
END
GO
INSERT INTO VERSAO(VERSAO, VERSAOATUALIZACAO, DATAATUALIZACAO) VALUES(399, 657, GETDATE());