morffix/migrations/000022_create_logs_table.up.sql
Samuel Lorch f52f517dc1
All checks were successful
/ release (push) Successful in 1m23s
Move logs from array to dedicated table
This avoids the append problem which bloats the database to 200+ gb in a
month and shrinks again to 5g with a full vacuum
2025-05-18 19:18:52 +02:00

5 lines
130 B
SQL

CREATE TABLE IF NOT EXISTS logs(
id bigserial PRIMARY KEY,
task_id bigint REFERENCES tasks(id) NOT NULL,
message text
);