GO
ALTER TABLE [dbo].[tbl_Configuracoes]
    ADD [IdnHabilitarIntegracao] BIT           NULL,
        [InstanciaServidor]      VARCHAR (100) NULL,
        [NomeBancoDados]         VARCHAR (50)  NULL,
        [NomeUsuario]            VARCHAR (50)  NULL,
        [SenhaUsuario]           VARCHAR (50)  NULL,
        [IdnDesabilitaLivreAutomatico] BIT     NULL, 
        [IdnHabilitaMarmitaKGTela]     BIT     NULL;
		
GO
UPDATE [dbo].[tbl_Configuracoes]
    SET [IdnHabilitarIntegracao] = 0,
        [IdnDesabilitaLivreAutomatico] = 0,
        [IdnHabilitaMarmitaKGTela] = 0;

GO
ALTER TABLE [dbo].[tbl_Comandas]
    ADD [IdnSincronizado]    BIT            NULL,
        [DadosSincronizacao] VARCHAR (5000) NULL,
		[QtdTentativasSincronizacao]     INT      NULL,
        [DataHoraTentativaSincronizacao] DATETIME NULL;

GO
CREATE TABLE [dbo].[tbl_Versao] (
    [Id]                 INT      IDENTITY (1, 1) NOT NULL,
    [Versao]             INT      NOT NULL,
    [VersaoMinimaTryerp] INT      NOT NULL,
    [DataAtualizacao]    DATETIME NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);

GO
INSERT INTO [dbo].[tbl_Versao] (Versao, VersaoMinimaTryerp, DataAtualizacao) VALUES (2, 485, getdate());