From 28936a7eb4f5557d955c90c82e571676bfe2577d Mon Sep 17 00:00:00 2001 From: APTX Date: Wed, 10 Apr 2013 16:27:57 +0200 Subject: [PATCH] Add check to make sure that either aid or fid is set for a mylist update --- localmylist/share/schema/schema.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/localmylist/share/schema/schema.sql b/localmylist/share/schema/schema.sql index 43b11a7..8888ffe 100644 --- a/localmylist/share/schema/schema.sql +++ b/localmylist/share/schema/schema.sql @@ -175,7 +175,8 @@ CREATE TABLE pending_mylist_update started timestamp without time zone, finished timestamp without time zone, fail_count integer NOT NULL DEFAULT 0, - CONSTRAINT pending_mylist_update_pk PRIMARY KEY (update_id ) + CONSTRAINT pending_mylist_update_pk PRIMARY KEY (update_id), + CONSTRAINT pending_mylist_update_valid_id_check CHECK (aid > 0 OR fid > 0) ); CREATE TABLE pending_request ( -- 2.52.0