-- Configuracao operacional editavel pelo painel.
CREATE TABLE IF NOT EXISTS nfse_runtime_config (
  id TINYINT UNSIGNED NOT NULL,
  sync_max_workers TINYINT UNSIGNED NOT NULL DEFAULT 3,
  created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO nfse_runtime_config (id, sync_max_workers)
VALUES (1, 3)
ON DUPLICATE KEY UPDATE id = VALUES(id);
