From 1a7c5329d07d9d961899aa7c85f9bd56fc06cb2d Mon Sep 17 00:00:00 2001
From: Dan Goodliffe <dan@randomdan.homeip.net>
Date: Sat, 27 Jun 2026 12:52:28 +0100
Subject: Remove the PK id column from access_log

Not actually required, should we need to reference a specific row, we
can use the ctid column.
---
 src/schema.sql | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'src/schema.sql')

diff --git a/src/schema.sql b/src/schema.sql
index 0d9fcb4..bd0dcfe 100644
--- a/src/schema.sql
+++ b/src/schema.sql
@@ -98,7 +98,6 @@ LANGUAGE plpgSQL
 RETURNS NULL ON NULL INPUT;
 
 CREATE TABLE access_log(
-	id bigint GENERATED ALWAYS AS IDENTITY,
 	hostname integer NOT NULL,
 	virtual_host integer NOT NULL,
 	remoteip inet NOT NULL,
@@ -113,7 +112,6 @@ CREATE TABLE access_log(
 	referrer integer,
 	user_agent integer,
 	content_type integer,
-	CONSTRAINT pk_access_log PRIMARY KEY (id),
 	CONSTRAINT fk_access_log_hostname FOREIGN KEY (hostname) REFERENCES entities(id) ON UPDATE CASCADE,
 	CONSTRAINT fk_access_log_virtualhost FOREIGN KEY (virtual_host) REFERENCES entities(id) ON UPDATE CASCADE,
 	CONSTRAINT fk_access_log_path FOREIGN KEY (path) REFERENCES entities(id) ON UPDATE CASCADE,
@@ -141,7 +139,6 @@ CREATE INDEX idx_access_log_virtual_host ON access_log(virtual_host);
 
 CREATE OR REPLACE VIEW access_log_view AS
 SELECT
-	l.id,
 	h.id hostname_id,
 	h.value hostname,
 	v.id virtual_host_id,
-- 
cgit v1.3

