From: Michael Tremer Date: Mon, 22 May 2023 19:27:57 +0000 (+0000) Subject: repos: Rename deleted to deleted_at X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dcd5a9743c0e61684b79bc33aa9c9a376527b65;p=pbs.git repos: Rename deleted to deleted_at Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/distribution.py b/src/buildservice/distribution.py index 9d2150df..6c889afe 100644 --- a/src/buildservice/distribution.py +++ b/src/buildservice/distribution.py @@ -327,7 +327,7 @@ class Distribution(base.DataObject): LEFT JOIN packages ON builds.pkg_id = packages.id WHERE - repositories.deleted IS TRUE + repositories.deleted_at IS NULL AND repositories.distro_id = %s AND diff --git a/src/database.sql b/src/database.sql index dd51f9b2..401de761 100644 --- a/src/database.sql +++ b/src/database.sql @@ -830,13 +830,13 @@ CREATE TABLE public.repo_builds ( CREATE TABLE public.repositories ( id integer NOT NULL, name text NOT NULL, - slug text, + slug text NOT NULL, description text DEFAULT ''::text NOT NULL, distro_id integer NOT NULL, key_id integer NOT NULL, mirrored boolean DEFAULT false NOT NULL, updated_at timestamp without time zone, - deleted boolean DEFAULT false NOT NULL, + deleted_at timestamp without time zone, priority integer, owner_id integer, created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL, @@ -1808,7 +1808,7 @@ CREATE UNIQUE INDEX repo_builds_unique ON public.repo_builds USING btree (repo_i -- Name: repositories_unique; Type: INDEX; Schema: public; Owner: - -- -CREATE UNIQUE INDEX repositories_unique ON public.repositories USING btree (owner_id, distro_id, slug) WHERE (deleted IS FALSE); +CREATE UNIQUE INDEX repositories_unique ON public.repositories USING btree (owner_id, distro_id, slug) WHERE (deleted_at IS NULL); --