From 15eb9611d0fc076f1ad941e7a55244ae1cc73202 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 12 Feb 2025 00:44:32 +0800 Subject: [PATCH] schema.sql: Fixes --- schema.sql | 9 ++++----- diff --git a/schema.sql b/schema.sql index f8fe980f74a83958a820838aa2f14c21b2354652..f90480d33b692e85f01702b5f5bff63ae7fa0a31 100644 --- a/schema.sql +++ b/schema.sql @@ -39,9 +39,9 @@ CREATE TABLE emails ( id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY, list_id INTEGER NOT NULL REFERENCES mailing_lists(id) ON DELETE CASCADE, title TEXT NOT NULL, - from TEXT NOT NULL, - date TIMESTAMP, - content BYTEA + sender TEXT NOT NULL, + date TIMESTAMP NOT NULL, + content BYTEA NOT NULL ); CREATE TABLE merge_requests ( @@ -51,8 +51,7 @@ creator INTEGER REFERENCES users(id) ON DELETE SET NULL, source_ref TEXT NOT NULL, destination_branch TEXT NOT NULL, status TEXT NOT NULL CHECK (status IN ('open', 'merged', 'closed')), - created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, - updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + created_at TIMESTAMP NOT NULL, mailing_list_id INT UNIQUE REFERENCES mailing_lists(id) ON DELETE CASCADE ); -- 2.48.1