Commit 68e96ac1 authored by Alexandro Lopes's avatar Alexandro Lopes
Browse files

refactor: #64346 - Recriação da tabela de autenticação

Retirada da coluna Id e criação de chave composta, para impedir a inserção de registros duplicados
No related merge requests found
Showing with 14 additions and 0 deletions
+14 -0
IF EXISTS(SELECT 1 FROM sys.tables WHERE Name = N'EmpresaAutenticacao')
BEGIN
DROP TABLE [dbo].[EmpresaAutenticacao];
CREATE TABLE [dbo].[EmpresaAutenticacao] (
[IdEmpresa] SMALLINT NOT NULL,
[Ambiente] VARCHAR (12) NOT NULL,
[ChaveIdent] VARCHAR (50) NOT NULL,
[NomeHeader] VARCHAR (50) NOT NULL,
[ValorHeader] VARCHAR (600) NOT NULL,
CONSTRAINT [PK_EmpresaAutenticacao] PRIMARY KEY CLUSTERED ([IdEmpresa] ASC, [Ambiente] ASC, [ChaveIdent] ASC, [NomeHeader] ASC),
CONSTRAINT [FK_EmpresaAutenticacao_Empresa] FOREIGN KEY ([IdEmpresa]) REFERENCES [dbo].[Empresa] ([Id])
);
END
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment