USE [TryNFeOnline]
GO

ALTER TABLE [dbo].[CFTEF] ALTER COLUMN [redeAdquirente] [varchar] (50) COLLATE Latin1_General_CI_AS NULL
GO
ALTER TABLE [dbo].[CFTEF] ALTER COLUMN [codigoAutorizacao] [varchar] (100) COLLATE Latin1_General_CI_AS NULL
GO
ALTER TABLE [dbo].[CFTEF] ALTER COLUMN [nomeCartaoAdministradora] [varchar] (200) COLLATE Latin1_General_CI_AS NULL
GO
ALTER TABLE [dbo].[CFTEF] ADD 
[qrCodePixEstabelecimento] [varchar] (1000) COLLATE Latin1_General_CI_AS NULL,
[idNotaFiscal] [int] NULL,
[modalidadePagamento] [varchar] (10) COLLATE Latin1_General_CI_AS NULL,
[codigoCarteiraDigital] [varchar] (50) COLLATE Latin1_General_CI_AS NULL,
[nomeCarteiraDigital] [varchar] (200) COLLATE Latin1_General_CI_AS NULL,
[codigoPSP] [varchar] (100) COLLATE Latin1_General_CI_AS NULL,
[numeroAutorizacaoNFCe] [varchar] (100) COLLATE Latin1_General_CI_AS NULL,
[bandeiraNFCe] [varchar] (50) COLLATE Latin1_General_CI_AS NULL,
[dataTransacao] [datetime] NULL
GO
ALTER TABLE [dbo].[ConfiguracoesSessao] ADD 
[codigoTerminalSiTef] [varchar] (20) COLLATE Latin1_General_CI_AS NULL
GO
ALTER TABLE [dbo].[parceiro] ADD 
[idnParceiroOSTransporte] [bit] NULL
GO
ALTER TABLE [dbo].[Servico] ADD 
[idnUtilizaNoApp] [bit] NULL
GO
CREATE TABLE [dbo].[EmitenteSiTef]
(
	[id] [int] IDENTITY (1,1) NOT NULL,
	[idEmitente] [int] NOT NULL,
	[enderecoIP] [varchar] (100) COLLATE Latin1_General_CI_AS NULL,
	[numeroLoja] [varchar] (20) COLLATE Latin1_General_CI_AS NULL,
	[numeroLogico] [varchar] (20) COLLATE Latin1_General_CI_AS NULL,
	[parametrosAdicionaisConfigura] [varchar] (2000) COLLATE Latin1_General_CI_AS NULL,
	[parametrosAdicionaisIniciaFuncao] [varchar] (5000) COLLATE Latin1_General_CI_AS NULL,
	CONSTRAINT [PK_EmitenteSiTef] 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].[EmitenteSiTef] ADD CONSTRAINT [FK_EmitenteSiTef_emitente] FOREIGN KEY
	(
		[idEmitente]
	)
	REFERENCES [dbo].[emitente]
	(
		[id]
	)
GO
INSERT INTO [dbo].[configuracaoNovo]([nomeParametro],[descricaoSimplificada],[descricaoDetalhada],[tipoValor],[valor],[grupo],[subgrupo],[tamanhoValorMaximo],[idnParametroMultilinhas],[idnParametroRadio],[idnParametroSelecaoPasta],[idnPermiteAlteracaoApenasPorAdmins],[idnCampoSenha],[tabelaSelecao],[filtroSelecao],[validacaoRegularExpression]) VALUES ('senhaSupervisorTEF', 'Senha de Supervisor do TEF', '', 'varchar', '12345', 'Financeiro', 'Configurações do Caixa',null,0,0,0,1,1,null,null,null)
GO
INSERT INTO VERSAO(VERSAO, VERSAOATUALIZACAO, DATAATUALIZACAO, REVISAO) VALUES(493, 751, GETDATE(),1);