summaryrefslogtreecommitdiff
path: root/src/schema.sql
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-06-27 12:52:28 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2026-06-27 12:52:28 +0100
commit1a7c5329d07d9d961899aa7c85f9bd56fc06cb2d (patch)
tree4d4b53febefa4f3adaf8a5f076bfe157c2957720 /src/schema.sql
parent856527b65e3c4807cf2bfb9d0e495d9712d56a90 (diff)
downloadwebstat-1a7c5329d07d9d961899aa7c85f9bd56fc06cb2d.tar.bz2
webstat-1a7c5329d07d9d961899aa7c85f9bd56fc06cb2d.tar.xz
webstat-1a7c5329d07d9d961899aa7c85f9bd56fc06cb2d.zip
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.
Diffstat (limited to 'src/schema.sql')
-rw-r--r--src/schema.sql3
1 files changed, 0 insertions, 3 deletions
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,