-- Author: Hayden Hargreaves (hhargreaves2006@gmail.com)
-- Desc:   Create the logs table.
-- Date:   01/23/2026

BEGIN;

CREATE TABLE IF NOT EXISTS Logs (
  Id SERIAL PRIMARY KEY NOT NULL, 
  Level TEXT NOT NULL CHECK (level IN ('TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', 'FATAL')),
  Message TEXT NOT NULL,
  Created TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

COMMIT;
