We don't want to have any duplicates, but we will have to accept any
duplicates that we are receiving from other sources.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
CREATE UNIQUE INDEX domains_sources ON public.domains USING btree (source_id, name) WHERE (removed_at IS NULL);
+--
+-- Name: domains_unique; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE UNIQUE INDEX domains_unique ON public.domains USING btree (list_id, name) WHERE ((source_id IS NULL) AND (removed_at IS NULL));
+
+
--
-- Name: domains_updated_at; Type: INDEX; Schema: public; Owner: -
--