From: APTX Date: Wed, 10 Apr 2013 14:27:57 +0000 (+0200) Subject: Add check to make sure that either aid or fid is set for a mylist update X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=28936a7eb4f5557d955c90c82e571676bfe2577d;p=localmylist.git Add check to make sure that either aid or fid is set for a mylist update --- 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 (