From 1381c89e0fbb183e8eb4e60529f0b026aad25cf3 Mon Sep 17 00:00:00 2001 From: "kacaii.dev" Date: Thu, 16 Apr 2026 09:19:39 -0300 Subject: [PATCH] :card_file_box: add "updated_at" check --- sql/create/tables.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/create/tables.sql b/sql/create/tables.sql index acd668c..785dc53 100644 --- a/sql/create/tables.sql +++ b/sql/create/tables.sql @@ -41,8 +41,10 @@ create table crew ( on update cascade on delete cascade, crew_name text unique not null, is_active boolean not null default true, + created_at timestamp not null default current_timestamp, - updated_at timestamp not null default current_timestamp, + updated_at timestamp not null default current_timestamp + check (updated_at >= created_at), primary key (id) ); -- 2.51.2