]> git.ipfire.org Git - pbs.git/commitdiff
repos: Rename deleted to deleted_at
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 May 2023 19:27:57 +0000 (19:27 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 22 May 2023 19:27:57 +0000 (19:27 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/buildservice/distribution.py
src/database.sql

index 9d2150dfb4f7dc435e06234f6cb736d24cec9fbe..6c889afef548bda677405a248b535a08d6b6f15c 100644 (file)
@@ -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
index dd51f9b26399805e5de2c987a132a94870c28572..401de7616a8b8550307dcc3d7c5342a73bafec7b 100644 (file)
@@ -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);
 
 
 --