USE [TryNFeOnline]
GO

ALTER TABLE [dbo].[Boleto] ADD 
[urlImpressaoBoleto] [varchar] (500) COLLATE Latin1_General_CI_AS NULL,
[resultadoEnvioBoleto] [varchar] (20) COLLATE Latin1_General_CI_AS NULL,
[mensagemStatusEnvio] [varchar] (50) COLLATE Latin1_General_CI_AS NULL,
[codigoTransacao] [varchar] (50) COLLATE Latin1_General_CI_AS NULL,
[dataGeracaoOnline] [datetime] NULL,
[valorEmCentavos] [int] NULL,
[statusBoleto] [varchar] (30) COLLATE Latin1_General_CI_AS NULL,
[codigoInternoSistema] [int] NULL,
[linhaDigitavel] [varchar] (70) COLLATE Latin1_General_CI_AS NULL,
[urlImpressaoBoletoPDF] [varchar] (500) COLLATE Latin1_General_CI_AS NULL,
[codigoHttpRetorno] [int] NULL,
[AdministradoraBoletoOnline] [varchar] (30) COLLATE Latin1_General_CI_AS NULL
GO
ALTER TABLE [dbo].[Conta] ADD 
[maximoDiasPagamentoPermitidoAposVencimento] [int] NULL,
[percentualDescontoAntecipado] [decimal] (18,4) NULL,
[exibirFrasePreConfiguradaPainel] [bit] NULL,
[tokenIntegracaoBoletoOnline] [varchar] (100) COLLATE Latin1_General_CI_AS NULL
GO
ALTER TABLE [dbo].[RegistroAtividades] ADD 
[idBoleto] [int] NULL
GO
CREATE TABLE [dbo].[cteMultimodalReferenciado]
(
	[id] [int] IDENTITY (1,1) NOT NULL,
	[idNotaFiscal] [int] NULL,
	[chave] [varchar] (50) COLLATE Latin1_General_CI_AS NULL,
	CONSTRAINT [PK_cteMultimodalReferenciado] PRIMARY KEY CLUSTERED
	(
		[id] ASC
	) WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY  = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[cteMultimodalReferenciado] ADD CONSTRAINT [FK_notafiscal_cteMultimodalReferenciado] FOREIGN KEY
	(
		[idNotaFiscal]
	)
	REFERENCES [dbo].[notafiscal]
	(
		[id]
	)
GO
INSERT INTO VERSAO(VERSAO, VERSAOATUALIZACAO, DATAATUALIZACAO) VALUES(365, 623, GETDATE());