pdf-accessibility/db/init.sql
Vadym Samoilenko 112719b2c5 Add Docker stack, frontend redesign, and visual page inspector fix
- Redesigned frontend with Outfit/Figtree typography, coral accent palette,
  noise texture, glassmorphism header, and staggered animations
- Split monolithic index.html into modular JS (app, api, upload, batch,
  results, page-viewer, utils) and extracted CSS
- Fixed worker.py to generate page images for Visual Page Inspector
- Added Docker Compose stack (web, worker, redis, postgres)
- Added batch upload, HTML report export, rate limiting, and Redis queue
- Extended test suite with checker, remediation, worker, and DB tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 18:12:44 +00:00

36 lines
1.2 KiB
SQL

-- PDF Accessibility Checker - PostgreSQL Schema
-- Run automatically on first Docker Compose startup
CREATE TABLE IF NOT EXISTS jobs (
id SERIAL PRIMARY KEY,
job_id VARCHAR(64) UNIQUE NOT NULL,
filename VARCHAR(255),
status VARCHAR(20) DEFAULT 'queued',
score INTEGER,
grade CHAR(1),
total_issues INTEGER,
critical_count INTEGER,
error_count INTEGER,
warning_count INTEGER,
result_json JSONB,
created_at TIMESTAMP DEFAULT NOW(),
completed_at TIMESTAMP,
processing_time FLOAT,
api_key_hash VARCHAR(64),
ip_address INET
);
CREATE TABLE IF NOT EXISTS audit_log (
id SERIAL PRIMARY KEY,
job_id VARCHAR(64),
action VARCHAR(50),
details JSONB,
created_at TIMESTAMP DEFAULT NOW(),
ip_address INET
);
CREATE INDEX IF NOT EXISTS idx_jobs_status ON jobs(status);
CREATE INDEX IF NOT EXISTS idx_jobs_created ON jobs(created_at);
CREATE INDEX IF NOT EXISTS idx_jobs_job_id ON jobs(job_id);
CREATE INDEX IF NOT EXISTS idx_audit_job ON audit_log(job_id);
CREATE INDEX IF NOT EXISTS idx_audit_created ON audit_log(created_at);