2 -- PostgreSQL database dump
5 -- Dumped from database version 15.10 (Debian 15.10-0+deb12u1)
6 -- Dumped by pg_dump version 15.10 (Debian 15.10-0+deb12u1)
8 SET statement_timeout
= 0;
10 SET idle_in_transaction_session_timeout
= 0;
11 SET client_encoding
= 'UTF8';
12 SET standard_conforming_strings
= on;
13 SELECT pg_catalog.
set_config('search_path', '', false);
14 SET check_function_bodies
= false;
15 SET xmloption
= content;
16 SET client_min_messages
= warning
;
17 SET row_security
= off;
20 -- Name: public; Type: SCHEMA; Schema: -; Owner: -
23 -- *not* creating schema, since initdb creates it
26 SET default_tablespace
= '';
28 SET default_table_access_method
= heap
;
31 -- Name: build_bugs; Type: TABLE; Schema: public; Owner: -
34 CREATE TABLE public.
build_bugs (
36 build_id
integer NOT NULL,
37 bug_id
integer NOT NULL,
38 added_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
40 removed_at
timestamp without time zone,
46 -- Name: build_bugs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
49 CREATE SEQUENCE public.build_bugs_id_seq
59 -- Name: build_bugs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
62 ALTER SEQUENCE public.build_bugs_id_seq
OWNED BY public.build_bugs.
id;
66 -- Name: build_comments; Type: TABLE; Schema: public; Owner: -
69 CREATE TABLE public.
build_comments (
71 build_id
integer NOT NULL,
72 user_id
integer NOT NULL,
73 text text DEFAULT ''::text NOT NULL,
74 created_at
timestamp without time zone DEFAULT now() NOT NULL,
75 deleted_at
timestamp without time zone
80 -- Name: build_groups; Type: TABLE; Schema: public; Owner: -
83 CREATE TABLE public.
build_groups (
85 uuid uuid
DEFAULT gen_random_uuid() NOT NULL,
86 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
87 created_by_id
integer,
88 deleted_at
timestamp without time zone,
89 deleted_by_id
integer,
90 finished_at
timestamp without time zone,
91 failed
boolean DEFAULT false NOT NULL,
92 tested_build_id
integer
97 -- Name: build_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
100 CREATE SEQUENCE public.build_groups_id_seq
110 -- Name: build_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
113 ALTER SEQUENCE public.build_groups_id_seq
OWNED BY public.build_groups.
id;
117 -- Name: build_packages; Type: TABLE; Schema: public; Owner: -
120 CREATE TABLE public.
build_packages (
121 build_id
integer NOT NULL,
122 package_id
integer NOT NULL,
123 job_id
integer NOT NULL,
124 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
129 -- Name: build_points; Type: TABLE; Schema: public; Owner: -
132 CREATE TABLE public.
build_points (
133 build_id
integer NOT NULL,
134 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
135 points
integer DEFAULT 0 NOT NULL,
141 -- Name: build_watchers; Type: TABLE; Schema: public; Owner: -
144 CREATE TABLE public.
build_watchers (
145 build_id
integer NOT NULL,
146 user_id
integer NOT NULL,
147 added_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
148 deleted_at
timestamp without time zone
153 -- Name: builder_stats; Type: TABLE; Schema: public; Owner: -
156 CREATE TABLE public.
builder_stats (
157 builder_id
integer NOT NULL,
158 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
159 cpu_user
double precision NOT NULL,
160 cpu_nice
double precision NOT NULL,
161 cpu_system
double precision NOT NULL,
162 cpu_idle
double precision NOT NULL,
163 cpu_iowait
double precision NOT NULL,
164 cpu_irq
double precision NOT NULL,
165 cpu_softirq
double precision NOT NULL,
166 cpu_steal
double precision NOT NULL,
167 cpu_guest
double precision NOT NULL,
168 cpu_guest_nice
double precision NOT NULL,
169 loadavg1
double precision NOT NULL,
170 loadavg5
double precision NOT NULL,
171 loadavg15
double precision NOT NULL,
172 mem_total
bigint NOT NULL,
173 mem_available
bigint NOT NULL,
174 mem_used
bigint NOT NULL,
175 mem_free
bigint NOT NULL,
176 mem_active
bigint NOT NULL,
177 mem_inactive
bigint NOT NULL,
178 mem_buffers
bigint NOT NULL,
179 mem_cached
bigint NOT NULL,
180 mem_shared
bigint NOT NULL,
181 swap_total
bigint NOT NULL,
182 swap_used
bigint NOT NULL,
183 swap_free
bigint NOT NULL
188 -- Name: builders; Type: TABLE; Schema: public; Owner: -
191 CREATE TABLE public.
builders (
195 enabled
boolean DEFAULT false NOT NULL,
196 loadavg
text DEFAULT '0'::character varying NOT NULL,
197 maintenance
boolean DEFAULT false NOT NULL,
198 max_jobs
bigint DEFAULT (1)::bigint NOT NULL,
202 cpu_count
integer DEFAULT 1 NOT NULL,
207 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
208 created_by_id
integer NOT NULL,
209 deleted_at
timestamp without time zone,
210 deleted_by_id
integer,
213 connected_at
timestamp without time zone,
219 -- Name: builders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
222 CREATE SEQUENCE public.builders_id_seq
231 -- Name: builders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
234 ALTER SEQUENCE public.builders_id_seq
OWNED BY public.builders.
id;
238 -- Name: builds; Type: TABLE; Schema: public; Owner: -
241 CREATE TABLE public.
builds (
243 uuid uuid
DEFAULT gen_random_uuid() NOT NULL,
244 pkg_id
integer NOT NULL,
246 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
247 repo_id
integer NOT NULL,
249 priority
integer DEFAULT 0 NOT NULL,
250 finished_at
timestamp without time zone,
251 failed
boolean DEFAULT false NOT NULL,
252 deleted_at
timestamp without time zone,
253 deleted_by_id
integer,
255 deprecating_build_id
integer,
256 deprecated_at
timestamp without time zone,
257 deprecated_by_id
integer,
258 test
boolean DEFAULT false NOT NULL,
259 disable_test_builds
boolean DEFAULT false NOT NULL,
260 points
integer DEFAULT 0 NOT NULL,
266 -- Name: builds_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
269 CREATE SEQUENCE public.builds_comments_id_seq
278 -- Name: builds_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
281 ALTER SEQUENCE public.builds_comments_id_seq
OWNED BY public.build_comments.
id;
285 -- Name: builds_id_seq; Type: SEQUENCE; Schema: public; Owner: -
288 CREATE SEQUENCE public.builds_id_seq
297 -- Name: builds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
300 ALTER SEQUENCE public.builds_id_seq
OWNED BY public.builds.
id;
304 -- Name: cache; Type: TABLE; Schema: public; Owner: -
307 CREATE TABLE public.
cache (
309 value bytea
NOT NULL,
310 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
311 expires_at
timestamp without time zone
316 -- Name: distributions; Type: TABLE; Schema: public; Owner: -
319 CREATE TABLE public.
distributions (
322 distro_id
text NOT NULL,
323 slogan
text DEFAULT ''::text NOT NULL,
324 description
text DEFAULT ''::text NOT NULL,
325 vendor
text DEFAULT ''::text NOT NULL,
326 contact
text DEFAULT ''::text NOT NULL,
327 version_id
integer NOT NULL,
328 deleted
boolean DEFAULT false NOT NULL,
329 arches
text[] DEFAULT ARRAY[]::text[] NOT NULL,
330 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
331 custom_config
text DEFAULT ''::text NOT NULL,
332 codename
text DEFAULT ''::text NOT NULL,
333 bugzilla_product
text DEFAULT ''::text NOT NULL,
334 bugzilla_version
text DEFAULT ''::text NOT NULL,
335 deleted_at
timestamp without time zone,
336 tag
text GENERATED ALWAYS AS ((distro_id || version_id
)) STORED
341 -- Name: distributions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
344 CREATE SEQUENCE public.distributions_id_seq
353 -- Name: distributions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
356 ALTER SEQUENCE public.distributions_id_seq
OWNED BY public.distributions.
id;
360 -- Name: images; Type: TABLE; Schema: public; Owner: -
363 CREATE TABLE public.
images (
365 release_id
integer NOT NULL,
368 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
369 created_by_id
integer,
370 deleted_at
timestamp without time zone,
371 deleted_by_id
integer,
373 size bigint NOT NULL,
374 checksum_sha3_512 bytea
NOT NULL,
375 checksum_sha3_256 bytea
NOT NULL,
376 checksum_blake2b512 bytea
NOT NULL,
377 checksum_blake2s256 bytea
NOT NULL,
378 checksum_sha2_512 bytea
NOT NULL,
379 checksum_sha2_256 bytea
NOT NULL
384 -- Name: images_id_seq; Type: SEQUENCE; Schema: public; Owner: -
387 CREATE SEQUENCE public.images_id_seq
397 -- Name: images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
400 ALTER SEQUENCE public.images_id_seq
OWNED BY public.images.
id;
404 -- Name: images_types; Type: TABLE; Schema: public; Owner: -
407 CREATE TABLE public.
images_types (
414 -- Name: images_types_id_seq; Type: SEQUENCE; Schema: public; Owner: -
417 CREATE SEQUENCE public.images_types_id_seq
426 -- Name: images_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
429 ALTER SEQUENCE public.images_types_id_seq
OWNED BY public.images_types.
id;
433 -- Name: job_packages; Type: TABLE; Schema: public; Owner: -
436 CREATE TABLE public.
job_packages (
437 job_id
integer NOT NULL,
438 pkg_id
integer NOT NULL
443 -- Name: jobs; Type: TABLE; Schema: public; Owner: -
446 CREATE TABLE public.
jobs (
448 uuid uuid
DEFAULT gen_random_uuid() NOT NULL,
449 build_id
integer NOT NULL,
451 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
452 started_at
timestamp without time zone,
453 finished_at
timestamp without time zone,
456 superseeded_by_id
integer,
457 installcheck_succeeded
boolean,
458 installcheck_performed_at
timestamp without time zone,
459 failed
boolean DEFAULT false NOT NULL,
462 log_digest_blake2s bytea
,
463 deleted_at
timestamp without time zone,
465 aborted
boolean DEFAULT false NOT NULL,
466 aborted_by_id
integer,
472 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
475 CREATE SEQUENCE public.jobs_id_seq
484 -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
487 ALTER SEQUENCE public.jobs_id_seq
OWNED BY public.jobs.
id;
491 -- Name: keys; Type: TABLE; Schema: public; Owner: -
494 CREATE TABLE public.
keys (
496 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
497 created_by_id
integer,
498 deleted_at
timestamp without time zone,
499 deleted_by_id
integer,
500 public_key
text NOT NULL,
501 secret_key
text NOT NULL,
502 key_id
numeric NOT NULL,
508 -- Name: keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
511 CREATE SEQUENCE public.keys_id_seq
521 -- Name: keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
524 ALTER SEQUENCE public.keys_id_seq
OWNED BY public.keys.
id;
528 -- Name: messages; Type: TABLE; Schema: public; Owner: -
531 CREATE TABLE public.
messages (
533 message
text NOT NULL,
534 queued_at
timestamp without time zone DEFAULT now() NOT NULL,
535 sent_at
timestamp without time zone,
536 priority
integer DEFAULT 0 NOT NULL,
542 -- Name: messages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
545 CREATE SEQUENCE public.messages_id_seq
554 -- Name: messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
557 ALTER SEQUENCE public.messages_id_seq
OWNED BY public.messages.
id;
561 -- Name: mirror_checks; Type: TABLE; Schema: public; Owner: -
564 CREATE TABLE public.
mirror_checks (
565 mirror_id
integer NOT NULL,
566 checked_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
567 success
boolean DEFAULT false NOT NULL,
568 response_time
double precision,
570 last_sync_at
timestamp without time zone,
576 -- Name: mirrors; Type: TABLE; Schema: public; Owner: -
579 CREATE TABLE public.
mirrors (
581 hostname
text NOT NULL,
585 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
586 created_by_id
integer NOT NULL,
587 deleted_at
timestamp without time zone,
588 deleted_by_id
integer,
589 last_check_success
boolean,
590 last_check_at
timestamp without time zone,
591 last_sync_at
timestamp without time zone,
595 notes
text DEFAULT ''::text NOT NULL,
596 addresses_ipv6 inet
[] DEFAULT '{}'::inet[] NOT NULL,
597 addresses_ipv4 inet
[] DEFAULT '{}'::inet[] NOT NULL
602 -- Name: mirrors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
605 CREATE SEQUENCE public.mirrors_id_seq
614 -- Name: mirrors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
617 ALTER SEQUENCE public.mirrors_id_seq
OWNED BY public.mirrors.
id;
621 -- Name: package_files; Type: TABLE; Schema: public; Owner: -
624 CREATE TABLE public.
package_files (
625 pkg_id
integer NOT NULL,
627 size bigint NOT NULL,
628 config
boolean DEFAULT false NOT NULL,
629 mode integer NOT NULL,
632 ctime
timestamp without time zone NOT NULL,
633 mtime
timestamp without time zone NOT NULL,
634 digest_sha2_512 bytea
,
635 digest_sha2_256 bytea
,
636 digest_blake2b512 bytea
,
637 digest_blake2s256 bytea
,
638 digest_sha3_512 bytea
,
639 digest_sha3_256 bytea
,
646 -- Name: packages; Type: TABLE; Schema: public; Owner: -
649 CREATE TABLE public.
packages (
654 groups
text[] NOT NULL,
656 license
text NOT NULL,
658 summary
text NOT NULL,
659 description
text NOT NULL,
660 size numeric NOT NULL,
665 build_host
text NOT NULL,
666 build_time
timestamp without time zone NOT NULL,
668 filesize
numeric NOT NULL,
669 prerequires
text[] DEFAULT ARRAY[]::text[] NOT NULL,
670 requires
text[] DEFAULT ARRAY[]::text[] NOT NULL,
671 provides
text[] DEFAULT ARRAY[]::text[] NOT NULL,
672 obsoletes
text[] DEFAULT ARRAY[]::text[] NOT NULL,
673 conflicts
text[] DEFAULT ARRAY[]::text[] NOT NULL,
674 recommends
text[] DEFAULT ARRAY[]::text[] NOT NULL,
675 suggests
text[] DEFAULT ARRAY[]::text[] NOT NULL,
676 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
677 digest_type
text NOT NULL,
678 digest bytea
NOT NULL,
679 deleted_at
timestamp without time zone,
681 distro_id
integer NOT NULL,
682 search tsvector
GENERATED ALWAYS AS (((setweight(to_tsvector('simple'::regconfig, name), 'A'::"char") ||
setweight(to_tsvector('english'::regconfig, summary
), 'B'::"char")) ||
setweight(to_tsvector('english'::regconfig, description
), 'C'::"char"))) STORED
687 -- Name: packages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
690 CREATE SEQUENCE public.packages_id_seq
699 -- Name: packages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
702 ALTER SEQUENCE public.packages_id_seq
OWNED BY public.packages.
id;
706 -- Name: ratelimiter; Type: TABLE; Schema: public; Owner: -
709 CREATE UNLOGGED
TABLE public.
ratelimiter (
711 "timestamp" timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
712 address inet
NOT NULL,
713 requests
integer DEFAULT 1 NOT NULL,
714 expires_at
timestamp without time zone NOT NULL
719 -- Name: relation_sizes; Type: VIEW; Schema: public; Owner: -
722 CREATE VIEW public.relation_sizes
AS
723 SELECT c.relname
AS relation
,
724 pg_size_pretty(pg_relation_size((c.oid
)::regclass)) AS size
726 LEFT JOIN pg_namespace n
ON ((n.oid
= c.relnamespace
)))
727 WHERE (n.nspname
<> ALL (ARRAY['pg_catalog'::name, 'information_schema'::name]))
728 ORDER BY (pg_relation_size((c.oid
)::regclass)) DESC;
732 -- Name: release_images; Type: TABLE; Schema: public; Owner: -
735 CREATE TABLE public.
release_images (
737 release_id
integer NOT NULL,
738 type_id
integer NOT NULL,
740 filename
text NOT NULL,
746 -- Name: release_images_id_seq; Type: SEQUENCE; Schema: public; Owner: -
749 CREATE SEQUENCE public.release_images_id_seq
759 -- Name: release_images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
762 ALTER SEQUENCE public.release_images_id_seq
OWNED BY public.release_images.
id;
766 -- Name: release_monitoring_releases; Type: TABLE; Schema: public; Owner: -
769 CREATE TABLE public.
release_monitoring_releases (
771 monitoring_id
integer NOT NULL,
772 version text NOT NULL,
773 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
783 -- Name: release_monitoring_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
786 CREATE SEQUENCE public.release_monitoring_releases_id_seq
796 -- Name: release_monitoring_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
799 ALTER SEQUENCE public.release_monitoring_releases_id_seq
OWNED BY public.release_monitoring_releases.
id;
803 -- Name: release_monitorings; Type: TABLE; Schema: public; Owner: -
806 CREATE TABLE public.
release_monitorings (
808 distro_id
integer NOT NULL,
810 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
811 created_by_id
integer NOT NULL,
812 deleted_at
timestamp without time zone,
813 deleted_by_id
integer,
814 project_id
integer NOT NULL,
815 follow
text NOT NULL,
816 last_check_at
timestamp without time zone,
817 create_builds
boolean DEFAULT true NOT NULL
822 -- Name: release_monitorings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
825 CREATE SEQUENCE public.release_monitorings_id_seq
835 -- Name: release_monitorings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
838 ALTER SEQUENCE public.release_monitorings_id_seq
OWNED BY public.release_monitorings.
id;
842 -- Name: releases; Type: TABLE; Schema: public; Owner: -
845 CREATE TABLE public.
releases (
847 distro_id
integer NOT NULL,
850 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
851 created_by_id
integer NOT NULL,
852 deleted_at
timestamp without time zone,
853 deleted_by_id
integer,
854 published_at
timestamp without time zone,
855 stable boolean DEFAULT false NOT NULL,
861 -- Name: releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
864 CREATE SEQUENCE public.releases_id_seq
874 -- Name: releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
877 ALTER SEQUENCE public.releases_id_seq
OWNED BY public.releases.
id;
881 -- Name: repositories; Type: TABLE; Schema: public; Owner: -
884 CREATE TABLE public.
repositories (
888 description
text DEFAULT ''::text NOT NULL,
889 distro_id
integer NOT NULL,
890 key_id
integer NOT NULL,
891 mirrored
boolean DEFAULT false NOT NULL,
892 updated_at
timestamp without time zone,
893 deleted_at
timestamp without time zone,
896 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
897 listed
boolean DEFAULT true NOT NULL,
903 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
906 CREATE SEQUENCE public.repositories_id_seq
915 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
918 ALTER SEQUENCE public.repositories_id_seq
OWNED BY public.repositories.
id;
922 -- Name: repository_builds; Type: TABLE; Schema: public; Owner: -
925 CREATE TABLE public.
repository_builds (
927 repo_id
integer NOT NULL,
928 build_id
bigint NOT NULL,
929 added_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
931 removed_at
timestamp without time zone,
932 removed_by_id
integer
937 -- Name: repository_builds_id_seq; Type: SEQUENCE; Schema: public; Owner: -
940 CREATE SEQUENCE public.repository_builds_id_seq
949 -- Name: repository_builds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
952 ALTER SEQUENCE public.repository_builds_id_seq
OWNED BY public.repository_builds.
id;
956 -- Name: sessions; Type: TABLE; Schema: public; Owner: -
959 CREATE TABLE public.
sessions (
961 session_id
text DEFAULT gen_random_uuid() NOT NULL,
962 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
963 expires_at
timestamp without time zone NOT NULL,
964 user_id
integer NOT NULL,
971 -- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
974 CREATE SEQUENCE public.sessions_id_seq
983 -- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
986 ALTER SEQUENCE public.sessions_id_seq
OWNED BY public.sessions.
id;
990 -- Name: source_commit_jobs; Type: TABLE; Schema: public; Owner: -
993 CREATE TABLE public.
source_commit_jobs (
995 commit_id
integer NOT NULL,
996 action text NOT NULL,
998 finished_at
timestamp without time zone,
1006 -- Name: source_commit_jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1009 CREATE SEQUENCE public.source_commit_jobs_id_seq
1019 -- Name: source_commit_jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1022 ALTER SEQUENCE public.source_commit_jobs_id_seq
OWNED BY public.source_commit_jobs.
id;
1026 -- Name: source_commits; Type: TABLE; Schema: public; Owner: -
1029 CREATE TABLE public.
source_commits (
1030 id integer NOT NULL,
1031 source_id
integer NOT NULL,
1032 revision
text NOT NULL,
1033 author
text NOT NULL,
1034 committer
text NOT NULL,
1035 subject
text NOT NULL,
1037 date timestamp without time zone NOT NULL,
1038 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
1039 deleted_at
timestamp without time zone,
1040 build_group_id
integer,
1041 finished_at
timestamp without time zone
1046 -- Name: source_commits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1049 CREATE SEQUENCE public.source_commits_id_seq
1058 -- Name: source_commits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1061 ALTER SEQUENCE public.source_commits_id_seq
OWNED BY public.source_commits.
id;
1065 -- Name: sources; Type: TABLE; Schema: public; Owner: -
1068 CREATE TABLE public.
sources (
1069 id integer NOT NULL,
1075 branch
text NOT NULL,
1076 last_fetched_at
timestamp without time zone,
1077 repo_id
integer NOT NULL,
1078 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
1079 created_by_id
integer NOT NULL,
1080 deleted_at
timestamp without time zone,
1081 deleted_by_id
integer
1086 -- Name: sources_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1089 CREATE SEQUENCE public.sources_id_seq
1098 -- Name: sources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1101 ALTER SEQUENCE public.sources_id_seq
OWNED BY public.sources.
id;
1105 -- Name: uploads; Type: TABLE; Schema: public; Owner: -
1108 CREATE TABLE public.
uploads (
1109 id integer NOT NULL,
1110 uuid uuid
DEFAULT gen_random_uuid() NOT NULL,
1113 filename
text NOT NULL,
1115 size bigint NOT NULL,
1116 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
1117 expires_at
timestamp without time zone DEFAULT (CURRENT_TIMESTAMP + '24:00:00'::interval) NOT NULL,
1118 digest_blake2b512 bytea
NOT NULL
1123 -- Name: uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1126 CREATE SEQUENCE public.uploads_id_seq
1135 -- Name: uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1138 ALTER SEQUENCE public.uploads_id_seq
OWNED BY public.uploads.
id;
1142 -- Name: user_push_subscriptions; Type: TABLE; Schema: public; Owner: -
1145 CREATE TABLE public.
user_push_subscriptions (
1146 id integer NOT NULL,
1147 user_id
integer NOT NULL,
1148 uuid uuid
DEFAULT gen_random_uuid() NOT NULL,
1149 created_at
timestamp without time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
1150 deleted_at
timestamp without time zone,
1152 endpoint
text NOT NULL,
1153 p256dh bytea
NOT NULL,
1159 -- Name: user_push_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1162 CREATE SEQUENCE public.user_push_subscriptions_id_seq
1172 -- Name: user_push_subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1175 ALTER SEQUENCE public.user_push_subscriptions_id_seq
OWNED BY public.user_push_subscriptions.
id;
1179 -- Name: users; Type: TABLE; Schema: public; Owner: -
1182 CREATE TABLE public.
users (
1183 id integer NOT NULL,
1185 deleted_at
timestamp without time zone,
1186 registered_at
timestamp without time zone DEFAULT now() NOT NULL,
1187 admin boolean DEFAULT false NOT NULL,
1188 storage_quota
bigint,
1189 perms
text[] DEFAULT ARRAY[]::text[] NOT NULL,
1191 bugzilla_api_key
text,
1192 daily_build_quota
interval
1197 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1200 CREATE SEQUENCE public.users_id_seq
1209 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1212 ALTER SEQUENCE public.users_id_seq
OWNED BY public.users.
id;
1216 -- Name: build_bugs id; Type: DEFAULT; Schema: public; Owner: -
1219 ALTER TABLE ONLY public.build_bugs
ALTER COLUMN id SET DEFAULT nextval('public.build_bugs_id_seq'::regclass);
1223 -- Name: build_comments id; Type: DEFAULT; Schema: public; Owner: -
1226 ALTER TABLE ONLY public.build_comments
ALTER COLUMN id SET DEFAULT nextval('public.builds_comments_id_seq'::regclass);
1230 -- Name: build_groups id; Type: DEFAULT; Schema: public; Owner: -
1233 ALTER TABLE ONLY public.build_groups
ALTER COLUMN id SET DEFAULT nextval('public.build_groups_id_seq'::regclass);
1237 -- Name: builders id; Type: DEFAULT; Schema: public; Owner: -
1240 ALTER TABLE ONLY public.builders
ALTER COLUMN id SET DEFAULT nextval('public.builders_id_seq'::regclass);
1244 -- Name: builds id; Type: DEFAULT; Schema: public; Owner: -
1247 ALTER TABLE ONLY public.builds
ALTER COLUMN id SET DEFAULT nextval('public.builds_id_seq'::regclass);
1251 -- Name: distributions id; Type: DEFAULT; Schema: public; Owner: -
1254 ALTER TABLE ONLY public.distributions
ALTER COLUMN id SET DEFAULT nextval('public.distributions_id_seq'::regclass);
1258 -- Name: images id; Type: DEFAULT; Schema: public; Owner: -
1261 ALTER TABLE ONLY public.images
ALTER COLUMN id SET DEFAULT nextval('public.images_id_seq'::regclass);
1265 -- Name: images_types id; Type: DEFAULT; Schema: public; Owner: -
1268 ALTER TABLE ONLY public.images_types
ALTER COLUMN id SET DEFAULT nextval('public.images_types_id_seq'::regclass);
1272 -- Name: jobs id; Type: DEFAULT; Schema: public; Owner: -
1275 ALTER TABLE ONLY public.jobs
ALTER COLUMN id SET DEFAULT nextval('public.jobs_id_seq'::regclass);
1279 -- Name: keys id; Type: DEFAULT; Schema: public; Owner: -
1282 ALTER TABLE ONLY public.keys
ALTER COLUMN id SET DEFAULT nextval('public.keys_id_seq'::regclass);
1286 -- Name: messages id; Type: DEFAULT; Schema: public; Owner: -
1289 ALTER TABLE ONLY public.messages
ALTER COLUMN id SET DEFAULT nextval('public.messages_id_seq'::regclass);
1293 -- Name: mirrors id; Type: DEFAULT; Schema: public; Owner: -
1296 ALTER TABLE ONLY public.mirrors
ALTER COLUMN id SET DEFAULT nextval('public.mirrors_id_seq'::regclass);
1300 -- Name: packages id; Type: DEFAULT; Schema: public; Owner: -
1303 ALTER TABLE ONLY public.packages
ALTER COLUMN id SET DEFAULT nextval('public.packages_id_seq'::regclass);
1307 -- Name: release_images id; Type: DEFAULT; Schema: public; Owner: -
1310 ALTER TABLE ONLY public.release_images
ALTER COLUMN id SET DEFAULT nextval('public.release_images_id_seq'::regclass);
1314 -- Name: release_monitoring_releases id; Type: DEFAULT; Schema: public; Owner: -
1317 ALTER TABLE ONLY public.release_monitoring_releases
ALTER COLUMN id SET DEFAULT nextval('public.release_monitoring_releases_id_seq'::regclass);
1321 -- Name: release_monitorings id; Type: DEFAULT; Schema: public; Owner: -
1324 ALTER TABLE ONLY public.release_monitorings
ALTER COLUMN id SET DEFAULT nextval('public.release_monitorings_id_seq'::regclass);
1328 -- Name: releases id; Type: DEFAULT; Schema: public; Owner: -
1331 ALTER TABLE ONLY public.releases
ALTER COLUMN id SET DEFAULT nextval('public.releases_id_seq'::regclass);
1335 -- Name: repositories id; Type: DEFAULT; Schema: public; Owner: -
1338 ALTER TABLE ONLY public.repositories
ALTER COLUMN id SET DEFAULT nextval('public.repositories_id_seq'::regclass);
1342 -- Name: repository_builds id; Type: DEFAULT; Schema: public; Owner: -
1345 ALTER TABLE ONLY public.repository_builds
ALTER COLUMN id SET DEFAULT nextval('public.repository_builds_id_seq'::regclass);
1349 -- Name: sessions id; Type: DEFAULT; Schema: public; Owner: -
1352 ALTER TABLE ONLY public.sessions
ALTER COLUMN id SET DEFAULT nextval('public.sessions_id_seq'::regclass);
1356 -- Name: source_commit_jobs id; Type: DEFAULT; Schema: public; Owner: -
1359 ALTER TABLE ONLY public.source_commit_jobs
ALTER COLUMN id SET DEFAULT nextval('public.source_commit_jobs_id_seq'::regclass);
1363 -- Name: source_commits id; Type: DEFAULT; Schema: public; Owner: -
1366 ALTER TABLE ONLY public.source_commits
ALTER COLUMN id SET DEFAULT nextval('public.source_commits_id_seq'::regclass);
1370 -- Name: sources id; Type: DEFAULT; Schema: public; Owner: -
1373 ALTER TABLE ONLY public.sources
ALTER COLUMN id SET DEFAULT nextval('public.sources_id_seq'::regclass);
1377 -- Name: uploads id; Type: DEFAULT; Schema: public; Owner: -
1380 ALTER TABLE ONLY public.uploads
ALTER COLUMN id SET DEFAULT nextval('public.uploads_id_seq'::regclass);
1384 -- Name: user_push_subscriptions id; Type: DEFAULT; Schema: public; Owner: -
1387 ALTER TABLE ONLY public.user_push_subscriptions
ALTER COLUMN id SET DEFAULT nextval('public.user_push_subscriptions_id_seq'::regclass);
1391 -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
1394 ALTER TABLE ONLY public.users
ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
1398 -- Name: build_bugs build_bugs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1401 ALTER TABLE ONLY public.build_bugs
1402 ADD CONSTRAINT build_bugs_pkey
PRIMARY KEY (id);
1406 -- Name: build_comments build_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1409 ALTER TABLE ONLY public.build_comments
1410 ADD CONSTRAINT build_comments_pkey
PRIMARY KEY (id);
1414 -- Name: build_groups build_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1417 ALTER TABLE ONLY public.build_groups
1418 ADD CONSTRAINT build_groups_pkey
PRIMARY KEY (id);
1422 -- Name: builds builds_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1425 ALTER TABLE ONLY public.builds
1426 ADD CONSTRAINT builds_pkey
PRIMARY KEY (id);
1430 -- Name: cache cache_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1433 ALTER TABLE ONLY public.
cache
1434 ADD CONSTRAINT cache_pkey
PRIMARY KEY (key);
1438 -- Name: distributions distributions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1441 ALTER TABLE ONLY public.distributions
1442 ADD CONSTRAINT distributions_pkey
PRIMARY KEY (id);
1446 -- Name: builders idx_2197954_primary; Type: CONSTRAINT; Schema: public; Owner: -
1449 ALTER TABLE ONLY public.builders
1450 ADD CONSTRAINT idx_2197954_primary
PRIMARY KEY (id);
1454 -- Name: images_types image_types_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1457 ALTER TABLE ONLY public.images_types
1458 ADD CONSTRAINT image_types_pkey
PRIMARY KEY (id);
1462 -- Name: images images_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1465 ALTER TABLE ONLY public.images
1466 ADD CONSTRAINT images_pkey
PRIMARY KEY (id);
1470 -- Name: images images_unique; Type: CONSTRAINT; Schema: public; Owner: -
1473 ALTER TABLE ONLY public.images
1474 ADD CONSTRAINT images_unique
UNIQUE (release_id
, type, arch
);
1478 -- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1481 ALTER TABLE ONLY public.jobs
1482 ADD CONSTRAINT jobs_pkey
PRIMARY KEY (id);
1486 -- Name: keys keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1489 ALTER TABLE ONLY public.keys
1490 ADD CONSTRAINT keys_pkey
PRIMARY KEY (id);
1494 -- Name: messages messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1497 ALTER TABLE ONLY public.messages
1498 ADD CONSTRAINT messages_pkey
PRIMARY KEY (id);
1502 -- Name: mirrors mirrors_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1505 ALTER TABLE ONLY public.mirrors
1506 ADD CONSTRAINT mirrors_pkey
PRIMARY KEY (id);
1510 -- Name: packages packages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1513 ALTER TABLE ONLY public.packages
1514 ADD CONSTRAINT packages_pkey
PRIMARY KEY (id);
1518 -- Name: ratelimiter ratelimiter_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1521 ALTER TABLE ONLY public.ratelimiter
1522 ADD CONSTRAINT ratelimiter_pkey
PRIMARY KEY (key, "timestamp", address
);
1526 -- Name: ratelimiter ratelimiter_unique; Type: CONSTRAINT; Schema: public; Owner: -
1529 ALTER TABLE ONLY public.ratelimiter
1530 ADD CONSTRAINT ratelimiter_unique
UNIQUE (key, "timestamp", address
);
1534 -- Name: release_images release_images_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1537 ALTER TABLE ONLY public.release_images
1538 ADD CONSTRAINT release_images_pkey
PRIMARY KEY (id);
1542 -- Name: release_monitoring_releases release_monitoring_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1545 ALTER TABLE ONLY public.release_monitoring_releases
1546 ADD CONSTRAINT release_monitoring_releases_pkey
PRIMARY KEY (id);
1550 -- Name: release_monitorings release_monitorings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1553 ALTER TABLE ONLY public.release_monitorings
1554 ADD CONSTRAINT release_monitorings_pkey
PRIMARY KEY (id);
1558 -- Name: releases releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1561 ALTER TABLE ONLY public.releases
1562 ADD CONSTRAINT releases_pkey
PRIMARY KEY (id);
1566 -- Name: repositories repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1569 ALTER TABLE ONLY public.repositories
1570 ADD CONSTRAINT repositories_pkey
PRIMARY KEY (id);
1574 -- Name: repository_builds repository_builds_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1577 ALTER TABLE ONLY public.repository_builds
1578 ADD CONSTRAINT repository_builds_pkey
PRIMARY KEY (id);
1582 -- Name: sessions sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1585 ALTER TABLE ONLY public.sessions
1586 ADD CONSTRAINT sessions_pkey
PRIMARY KEY (id);
1590 -- Name: sessions sessions_session_id_key; Type: CONSTRAINT; Schema: public; Owner: -
1593 ALTER TABLE ONLY public.sessions
1594 ADD CONSTRAINT sessions_session_id_key
UNIQUE (session_id
);
1598 -- Name: source_commit_jobs source_commit_jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1601 ALTER TABLE ONLY public.source_commit_jobs
1602 ADD CONSTRAINT source_commit_jobs_pkey
PRIMARY KEY (id);
1606 -- Name: source_commits source_commits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1609 ALTER TABLE ONLY public.source_commits
1610 ADD CONSTRAINT source_commits_pkey
PRIMARY KEY (id);
1614 -- Name: sources sources_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1617 ALTER TABLE ONLY public.sources
1618 ADD CONSTRAINT sources_pkey
PRIMARY KEY (id);
1622 -- Name: uploads uploads_id; Type: CONSTRAINT; Schema: public; Owner: -
1625 ALTER TABLE ONLY public.uploads
1626 ADD CONSTRAINT uploads_id
PRIMARY KEY (id);
1630 -- Name: user_push_subscriptions user_push_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1633 ALTER TABLE ONLY public.user_push_subscriptions
1634 ADD CONSTRAINT user_push_subscriptions_pkey
PRIMARY KEY (id);
1638 -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1641 ALTER TABLE ONLY public.users
1642 ADD CONSTRAINT users_pkey
PRIMARY KEY (id);
1646 -- Name: build_bugs_unique; Type: INDEX; Schema: public; Owner: -
1649 CREATE UNIQUE INDEX build_bugs_unique
ON public.build_bugs
USING btree (build_id
, bug_id
) WHERE (removed_at
IS NULL);
1653 -- Name: build_groups_uuid; Type: INDEX; Schema: public; Owner: -
1656 CREATE UNIQUE INDEX build_groups_uuid
ON public.build_groups
USING btree (uuid
) WHERE (deleted_at
IS NULL);
1660 -- Name: build_packages_build_id; Type: INDEX; Schema: public; Owner: -
1663 CREATE INDEX build_packages_build_id
ON public.build_packages
USING btree (build_id
);
1667 -- Name: build_points_build_id; Type: INDEX; Schema: public; Owner: -
1670 CREATE INDEX build_points_build_id
ON public.build_points
USING btree (build_id
);
1674 -- Name: build_watchers_unique; Type: INDEX; Schema: public; Owner: -
1677 CREATE UNIQUE INDEX build_watchers_unique
ON public.build_watchers
USING btree (build_id
, user_id
) WHERE (deleted_at
IS NULL);
1681 -- Name: builders_name; Type: INDEX; Schema: public; Owner: -
1684 CREATE UNIQUE INDEX builders_name
ON public.builders
USING btree (name) WHERE (deleted_at
IS NULL);
1688 -- Name: builds_build_group_id; Type: INDEX; Schema: public; Owner: -
1691 CREATE INDEX builds_build_group_id
ON public.builds
USING btree (group_id
) WHERE (deleted_at
IS NULL);
1695 -- Name: builds_created_at; Type: INDEX; Schema: public; Owner: -
1698 CREATE INDEX builds_created_at
ON public.builds
USING btree (created_at
DESC) WHERE (deleted_at
IS NULL);
1702 -- Name: builds_deleted; Type: INDEX; Schema: public; Owner: -
1705 CREATE INDEX builds_deleted
ON public.builds
USING btree (deleted_at
) WHERE (deleted_at
IS NOT NULL);
1709 -- Name: builds_deprecating_build_id; Type: INDEX; Schema: public; Owner: -
1712 CREATE INDEX builds_deprecating_build_id
ON public.builds
USING btree (deprecating_build_id
) WHERE ((deleted_at
IS NULL) AND (deprecated_at
IS NOT NULL));
1716 -- Name: builds_not_tests; Type: INDEX; Schema: public; Owner: -
1719 CREATE UNIQUE INDEX builds_not_tests
ON public.builds
USING btree (id) WHERE ((test
IS FALSE) AND (deleted_at
IS NULL));
1723 -- Name: builds_pkg_id; Type: INDEX; Schema: public; Owner: -
1726 CREATE INDEX builds_pkg_id
ON public.builds
USING btree (pkg_id
) WHERE (deleted_at
IS NULL);
1730 -- Name: builds_scratch_builds; Type: INDEX; Schema: public; Owner: -
1733 CREATE UNIQUE INDEX builds_scratch_builds
ON public.builds
USING btree (id) WHERE ((deleted_at
IS NULL) AND (test
IS FALSE) AND (owner_id
IS NOT NULL));
1737 -- Name: builds_uuid; Type: INDEX; Schema: public; Owner: -
1740 CREATE UNIQUE INDEX builds_uuid
ON public.builds
USING btree (uuid
) WHERE (deleted_at
IS NULL);
1744 -- Name: distributions_tag; Type: INDEX; Schema: public; Owner: -
1747 CREATE UNIQUE INDEX distributions_tag
ON public.distributions
USING btree (tag
) WHERE (deleted_at
IS NULL);
1751 -- Name: distributions_unique; Type: INDEX; Schema: public; Owner: -
1754 CREATE UNIQUE INDEX distributions_unique
ON public.distributions
USING btree (distro_id
, version_id
) WHERE (deleted
IS FALSE);
1758 -- Name: job_packages_job_id; Type: INDEX; Schema: public; Owner: -
1761 CREATE INDEX job_packages_job_id
ON public.job_packages
USING btree (job_id
);
1765 -- Name: job_packages_pkg_id; Type: INDEX; Schema: public; Owner: -
1768 CREATE UNIQUE INDEX job_packages_pkg_id
ON public.job_packages
USING btree (pkg_id
);
1772 -- Name: jobs_arch; Type: INDEX; Schema: public; Owner: -
1775 CREATE INDEX jobs_arch
ON public.jobs
USING btree (arch
);
1779 -- Name: jobs_build_id; Type: INDEX; Schema: public; Owner: -
1782 CREATE INDEX jobs_build_id
ON public.jobs
USING btree (build_id
) WHERE (deleted_at
IS NULL);
1786 -- Name: jobs_finished_at; Type: INDEX; Schema: public; Owner: -
1789 CREATE INDEX jobs_finished_at
ON public.jobs
USING btree (finished_at
DESC) WHERE (finished_at
IS NOT NULL);
1793 -- Name: jobs_pending; Type: INDEX; Schema: public; Owner: -
1796 CREATE INDEX jobs_pending
ON public.jobs
USING btree (id) WHERE ((deleted_at
IS NULL) AND (started_at
IS NULL) AND (finished_at
IS NULL) AND (installcheck_succeeded
IS TRUE));
1800 -- Name: jobs_running; Type: INDEX; Schema: public; Owner: -
1803 CREATE INDEX jobs_running
ON public.jobs
USING btree (started_at
) WHERE ((deleted_at
IS NULL) AND (started_at
IS NOT NULL) AND (finished_at
IS NULL));
1807 -- Name: jobs_superseeded_by; Type: INDEX; Schema: public; Owner: -
1810 CREATE INDEX jobs_superseeded_by
ON public.jobs
USING btree (superseeded_by_id
);
1814 -- Name: jobs_uuid; Type: INDEX; Schema: public; Owner: -
1817 CREATE UNIQUE INDEX jobs_uuid
ON public.jobs
USING btree (uuid
) WHERE (deleted_at
IS NULL);
1821 -- Name: messages_queued; Type: INDEX; Schema: public; Owner: -
1824 CREATE INDEX messages_queued
ON public.messages
USING btree (priority
DESC, queued_at
) WHERE (sent_at
IS NULL);
1828 -- Name: mirror_checks_search; Type: INDEX; Schema: public; Owner: -
1831 CREATE INDEX mirror_checks_search
ON public.mirror_checks
USING btree (mirror_id
, checked_at
);
1835 -- Name: mirrors_hostname; Type: INDEX; Schema: public; Owner: -
1838 CREATE UNIQUE INDEX mirrors_hostname
ON public.mirrors
USING btree (hostname
) WHERE (deleted_at
IS NULL);
1842 -- Name: package_files_path; Type: INDEX; Schema: public; Owner: -
1845 CREATE INDEX package_files_path
ON public.package_files
USING btree (path);
1849 -- Name: package_files_pkg_id; Type: INDEX; Schema: public; Owner: -
1852 CREATE INDEX package_files_pkg_id
ON public.package_files
USING btree (pkg_id
);
1856 -- Name: packages_name; Type: INDEX; Schema: public; Owner: -
1859 CREATE INDEX packages_name
ON public.packages
USING btree (name);
1863 -- Name: packages_search; Type: INDEX; Schema: public; Owner: -
1866 CREATE INDEX packages_search
ON public.packages
USING gin (search) WHERE (deleted_at
IS NULL);
1870 -- Name: release_monitoring_releases_build_id; Type: INDEX; Schema: public; Owner: -
1873 CREATE INDEX release_monitoring_releases_build_id
ON public.release_monitoring_releases
USING btree (build_id
);
1877 -- Name: release_monitoring_releases_search; Type: INDEX; Schema: public; Owner: -
1880 CREATE INDEX release_monitoring_releases_search
ON public.release_monitoring_releases
USING btree (monitoring_id
, created_at
);
1884 -- Name: release_monitoring_releases_unique; Type: INDEX; Schema: public; Owner: -
1887 CREATE UNIQUE INDEX release_monitoring_releases_unique
ON public.release_monitoring_releases
USING btree (monitoring_id
, version);
1891 -- Name: release_monitorings_unique; Type: INDEX; Schema: public; Owner: -
1894 CREATE UNIQUE INDEX release_monitorings_unique
ON public.release_monitorings
USING btree (distro_id
, name) WHERE (deleted_at
IS NULL);
1898 -- Name: releases_distro_id; Type: INDEX; Schema: public; Owner: -
1901 CREATE INDEX releases_distro_id
ON public.releases
USING btree (distro_id
) WHERE (deleted_at
IS NULL);
1905 -- Name: releases_unique; Type: INDEX; Schema: public; Owner: -
1908 CREATE UNIQUE INDEX releases_unique
ON public.releases
USING btree (slug
) WHERE (deleted_at
IS NULL);
1912 -- Name: repositories_unique; Type: INDEX; Schema: public; Owner: -
1915 CREATE UNIQUE INDEX repositories_unique
ON public.repositories
USING btree (owner_id
, distro_id
, slug
) WHERE (deleted_at
IS NULL);
1919 -- Name: repository_builds_build_id; Type: INDEX; Schema: public; Owner: -
1922 CREATE INDEX repository_builds_build_id
ON public.repository_builds
USING btree (build_id
);
1926 -- Name: repository_builds_repo_id; Type: INDEX; Schema: public; Owner: -
1929 CREATE INDEX repository_builds_repo_id
ON public.repository_builds
USING btree (repo_id
) WHERE (removed_at
IS NULL);
1933 -- Name: repository_builds_unique; Type: INDEX; Schema: public; Owner: -
1936 CREATE UNIQUE INDEX repository_builds_unique
ON public.repository_builds
USING btree (repo_id
, build_id
) WHERE (removed_at
IS NULL);
1940 -- Name: source_commit_jobs_commit_id; Type: INDEX; Schema: public; Owner: -
1943 CREATE INDEX source_commit_jobs_commit_id
ON public.source_commit_jobs
USING btree (commit_id
);
1947 -- Name: source_commits_unique; Type: INDEX; Schema: public; Owner: -
1950 CREATE UNIQUE INDEX source_commits_unique
ON public.source_commits
USING btree (source_id
, revision
);
1954 -- Name: sources_repo_id; Type: INDEX; Schema: public; Owner: -
1957 CREATE INDEX sources_repo_id
ON public.sources
USING btree (repo_id
) WHERE (deleted_at
IS NULL);
1961 -- Name: sources_slug; Type: INDEX; Schema: public; Owner: -
1964 CREATE UNIQUE INDEX sources_slug
ON public.sources
USING btree (slug
) WHERE (deleted_at
IS NULL);
1968 -- Name: uploads_builder_id; Type: INDEX; Schema: public; Owner: -
1971 CREATE INDEX uploads_builder_id
ON public.uploads
USING btree (builder_id
);
1975 -- Name: uploads_user_id; Type: INDEX; Schema: public; Owner: -
1978 CREATE INDEX uploads_user_id
ON public.uploads
USING btree (user_id
);
1982 -- Name: uploads_uuid; Type: INDEX; Schema: public; Owner: -
1985 CREATE UNIQUE INDEX uploads_uuid
ON public.uploads
USING btree (uuid
);
1989 -- Name: user_push_subscriptions_user_id; Type: INDEX; Schema: public; Owner: -
1992 CREATE INDEX user_push_subscriptions_user_id
ON public.user_push_subscriptions
USING btree (user_id
) WHERE (deleted_at
IS NULL);
1996 -- Name: users_name; Type: INDEX; Schema: public; Owner: -
1999 CREATE UNIQUE INDEX users_name
ON public.users
USING btree (name) WHERE (deleted_at
IS NULL);
2003 -- Name: build_bugs build_bugs_added_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2006 ALTER TABLE ONLY public.build_bugs
2007 ADD CONSTRAINT build_bugs_added_by
FOREIGN KEY (added_by_id
) REFERENCES public.
users(id);
2011 -- Name: build_bugs build_bugs_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2014 ALTER TABLE ONLY public.build_bugs
2015 ADD CONSTRAINT build_bugs_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2019 -- Name: build_bugs build_bugs_removed_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2022 ALTER TABLE ONLY public.build_bugs
2023 ADD CONSTRAINT build_bugs_removed_by
FOREIGN KEY (removed_by_id
) REFERENCES public.
users(id);
2027 -- Name: build_groups build_groups_created_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2030 ALTER TABLE ONLY public.build_groups
2031 ADD CONSTRAINT build_groups_created_by
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2035 -- Name: build_groups build_groups_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2038 ALTER TABLE ONLY public.build_groups
2039 ADD CONSTRAINT build_groups_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2043 -- Name: build_groups build_groups_tested_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2046 ALTER TABLE ONLY public.build_groups
2047 ADD CONSTRAINT build_groups_tested_build_id
FOREIGN KEY (tested_build_id
) REFERENCES public.
builds(id);
2051 -- Name: build_packages build_packages_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2054 ALTER TABLE ONLY public.build_packages
2055 ADD CONSTRAINT build_packages_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2059 -- Name: build_packages build_packages_job_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2062 ALTER TABLE ONLY public.build_packages
2063 ADD CONSTRAINT build_packages_job_id
FOREIGN KEY (job_id
) REFERENCES public.
jobs(id);
2067 -- Name: build_packages build_packages_package_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2070 ALTER TABLE ONLY public.build_packages
2071 ADD CONSTRAINT build_packages_package_id
FOREIGN KEY (package_id
) REFERENCES public.
packages(id);
2075 -- Name: build_points build_points_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2078 ALTER TABLE ONLY public.build_points
2079 ADD CONSTRAINT build_points_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2083 -- Name: build_points build_points_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2086 ALTER TABLE ONLY public.build_points
2087 ADD CONSTRAINT build_points_user_id
FOREIGN KEY (user_id
) REFERENCES public.
users(id);
2091 -- Name: build_watchers build_watchers_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2094 ALTER TABLE ONLY public.build_watchers
2095 ADD CONSTRAINT build_watchers_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2099 -- Name: build_watchers build_watchers_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2102 ALTER TABLE ONLY public.build_watchers
2103 ADD CONSTRAINT build_watchers_user_id
FOREIGN KEY (user_id
) REFERENCES public.
users(id);
2107 -- Name: builder_stats builder_stats_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2110 ALTER TABLE ONLY public.builder_stats
2111 ADD CONSTRAINT builder_stats_builder_id
FOREIGN KEY (builder_id
) REFERENCES public.
builders(id);
2115 -- Name: builders builders_created_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2118 ALTER TABLE ONLY public.builders
2119 ADD CONSTRAINT builders_created_by
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2123 -- Name: builders builders_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2126 ALTER TABLE ONLY public.builders
2127 ADD CONSTRAINT builders_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2131 -- Name: build_comments builds_comments_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2134 ALTER TABLE ONLY public.build_comments
2135 ADD CONSTRAINT builds_comments_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2139 -- Name: build_comments builds_comments_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2142 ALTER TABLE ONLY public.build_comments
2143 ADD CONSTRAINT builds_comments_user_id
FOREIGN KEY (user_id
) REFERENCES public.
users(id);
2147 -- Name: builds builds_commit_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2150 ALTER TABLE ONLY public.builds
2151 ADD CONSTRAINT builds_commit_id
FOREIGN KEY (commit_id
) REFERENCES public.
source_commits(id) NOT VALID;
2155 -- Name: builds builds_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2158 ALTER TABLE ONLY public.builds
2159 ADD CONSTRAINT builds_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2163 -- Name: builds builds_deprecated_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2166 ALTER TABLE ONLY public.builds
2167 ADD CONSTRAINT builds_deprecated_by
FOREIGN KEY (deprecated_by_id
) REFERENCES public.
users(id);
2171 -- Name: builds builds_deprecating_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2174 ALTER TABLE ONLY public.builds
2175 ADD CONSTRAINT builds_deprecating_build_id
FOREIGN KEY (deprecating_build_id
) REFERENCES public.
builds(id);
2179 -- Name: builds builds_group_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2182 ALTER TABLE ONLY public.builds
2183 ADD CONSTRAINT builds_group_id
FOREIGN KEY (group_id
) REFERENCES public.
build_groups(id);
2187 -- Name: builds builds_owner_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2190 ALTER TABLE ONLY public.builds
2191 ADD CONSTRAINT builds_owner_id
FOREIGN KEY (owner_id
) REFERENCES public.
users(id);
2195 -- Name: builds builds_pkg_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2198 ALTER TABLE ONLY public.builds
2199 ADD CONSTRAINT builds_pkg_id
FOREIGN KEY (pkg_id
) REFERENCES public.
packages(id);
2203 -- Name: builds builds_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2206 ALTER TABLE ONLY public.builds
2207 ADD CONSTRAINT builds_repo_id
FOREIGN KEY (repo_id
) REFERENCES public.
repositories(id);
2211 -- Name: images images_created_by_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2214 ALTER TABLE ONLY public.images
2215 ADD CONSTRAINT images_created_by_id
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2219 -- Name: images images_deleted_by_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2222 ALTER TABLE ONLY public.images
2223 ADD CONSTRAINT images_deleted_by_id
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2227 -- Name: images images_release_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2230 ALTER TABLE ONLY public.images
2231 ADD CONSTRAINT images_release_id
FOREIGN KEY (release_id
) REFERENCES public.
releases(id);
2235 -- Name: job_packages job_packages_job_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2238 ALTER TABLE ONLY public.job_packages
2239 ADD CONSTRAINT job_packages_job_id
FOREIGN KEY (job_id
) REFERENCES public.
jobs(id);
2243 -- Name: job_packages job_packages_pkg_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2246 ALTER TABLE ONLY public.job_packages
2247 ADD CONSTRAINT job_packages_pkg_id
FOREIGN KEY (pkg_id
) REFERENCES public.
packages(id);
2251 -- Name: jobs jobs_aborted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2254 ALTER TABLE ONLY public.jobs
2255 ADD CONSTRAINT jobs_aborted_by
FOREIGN KEY (aborted_by_id
) REFERENCES public.
users(id);
2259 -- Name: jobs jobs_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2262 ALTER TABLE ONLY public.jobs
2263 ADD CONSTRAINT jobs_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2267 -- Name: jobs jobs_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2270 ALTER TABLE ONLY public.jobs
2271 ADD CONSTRAINT jobs_builder_id
FOREIGN KEY (builder_id
) REFERENCES public.
builders(id);
2275 -- Name: jobs jobs_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2278 ALTER TABLE ONLY public.jobs
2279 ADD CONSTRAINT jobs_deleted_by
FOREIGN KEY (deleted_by
) REFERENCES public.
users(id);
2283 -- Name: jobs jobs_superseeded_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2286 ALTER TABLE ONLY public.jobs
2287 ADD CONSTRAINT jobs_superseeded_by
FOREIGN KEY (superseeded_by_id
) REFERENCES public.
jobs(id);
2291 -- Name: keys keys_created_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2294 ALTER TABLE ONLY public.keys
2295 ADD CONSTRAINT keys_created_by
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2299 -- Name: keys keys_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2302 ALTER TABLE ONLY public.keys
2303 ADD CONSTRAINT keys_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2307 -- Name: mirror_checks mirror_checks_mirror_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2310 ALTER TABLE ONLY public.mirror_checks
2311 ADD CONSTRAINT mirror_checks_mirror_id
FOREIGN KEY (mirror_id
) REFERENCES public.
mirrors(id);
2315 -- Name: mirrors mirrors_created_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2318 ALTER TABLE ONLY public.mirrors
2319 ADD CONSTRAINT mirrors_created_by
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2323 -- Name: mirrors mirrors_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2326 ALTER TABLE ONLY public.mirrors
2327 ADD CONSTRAINT mirrors_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2331 -- Name: package_files package_files_pkg_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2334 ALTER TABLE ONLY public.package_files
2335 ADD CONSTRAINT package_files_pkg_id
FOREIGN KEY (pkg_id
) REFERENCES public.
packages(id);
2339 -- Name: packages packages_commit_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2342 ALTER TABLE ONLY public.packages
2343 ADD CONSTRAINT packages_commit_id
FOREIGN KEY (commit_id
) REFERENCES public.
source_commits(id);
2347 -- Name: packages packages_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2350 ALTER TABLE ONLY public.packages
2351 ADD CONSTRAINT packages_deleted_by
FOREIGN KEY (deleted_by
) REFERENCES public.
users(id);
2355 -- Name: packages packages_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2358 ALTER TABLE ONLY public.packages
2359 ADD CONSTRAINT packages_distro_id
FOREIGN KEY (distro_id
) REFERENCES public.
distributions(id);
2363 -- Name: release_images release_images_release_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2366 ALTER TABLE ONLY public.release_images
2367 ADD CONSTRAINT release_images_release_id
FOREIGN KEY (release_id
) REFERENCES public.
releases(id);
2371 -- Name: release_images release_images_type_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2374 ALTER TABLE ONLY public.release_images
2375 ADD CONSTRAINT release_images_type_id
FOREIGN KEY (type_id
) REFERENCES public.
images_types(id);
2379 -- Name: release_monitoring_releases release_monitoring_releases_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2382 ALTER TABLE ONLY public.release_monitoring_releases
2383 ADD CONSTRAINT release_monitoring_releases_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2387 -- Name: release_monitoring_releases release_monitoring_releases_monitoring_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2390 ALTER TABLE ONLY public.release_monitoring_releases
2391 ADD CONSTRAINT release_monitoring_releases_monitoring_id
FOREIGN KEY (monitoring_id
) REFERENCES public.
release_monitorings(id);
2395 -- Name: release_monitoring_releases release_monitoring_releases_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2398 ALTER TABLE ONLY public.release_monitoring_releases
2399 ADD CONSTRAINT release_monitoring_releases_repo_id
FOREIGN KEY (repo_id
) REFERENCES public.
repositories(id);
2403 -- Name: release_monitorings release_monitorings_created_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2406 ALTER TABLE ONLY public.release_monitorings
2407 ADD CONSTRAINT release_monitorings_created_by
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2411 -- Name: release_monitorings release_monitorings_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2414 ALTER TABLE ONLY public.release_monitorings
2415 ADD CONSTRAINT release_monitorings_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2419 -- Name: release_monitorings release_monitorings_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2422 ALTER TABLE ONLY public.release_monitorings
2423 ADD CONSTRAINT release_monitorings_distro_id
FOREIGN KEY (distro_id
) REFERENCES public.
distributions(id);
2427 -- Name: releases releases_created_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2430 ALTER TABLE ONLY public.releases
2431 ADD CONSTRAINT releases_created_by
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2435 -- Name: releases releases_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2438 ALTER TABLE ONLY public.releases
2439 ADD CONSTRAINT releases_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2443 -- Name: releases releases_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2446 ALTER TABLE ONLY public.releases
2447 ADD CONSTRAINT releases_distro_id
FOREIGN KEY (distro_id
) REFERENCES public.
distributions(id);
2451 -- Name: repositories repositories_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2454 ALTER TABLE ONLY public.repositories
2455 ADD CONSTRAINT repositories_deleted_by
FOREIGN KEY (deleted_by
) REFERENCES public.
users(id);
2459 -- Name: repositories repositories_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2462 ALTER TABLE ONLY public.repositories
2463 ADD CONSTRAINT repositories_distro_id
FOREIGN KEY (distro_id
) REFERENCES public.
distributions(id);
2467 -- Name: repositories repositories_key_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2470 ALTER TABLE ONLY public.repositories
2471 ADD CONSTRAINT repositories_key_id
FOREIGN KEY (key_id
) REFERENCES public.
keys(id);
2475 -- Name: repositories repositories_owner_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2478 ALTER TABLE ONLY public.repositories
2479 ADD CONSTRAINT repositories_owner_id
FOREIGN KEY (owner_id
) REFERENCES public.
users(id);
2483 -- Name: repository_builds repository_builds_added_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2486 ALTER TABLE ONLY public.repository_builds
2487 ADD CONSTRAINT repository_builds_added_by
FOREIGN KEY (added_by_id
) REFERENCES public.
users(id);
2491 -- Name: repository_builds repository_builds_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2494 ALTER TABLE ONLY public.repository_builds
2495 ADD CONSTRAINT repository_builds_build_id
FOREIGN KEY (build_id
) REFERENCES public.
builds(id);
2499 -- Name: repository_builds repository_builds_removed_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2502 ALTER TABLE ONLY public.repository_builds
2503 ADD CONSTRAINT repository_builds_removed_by
FOREIGN KEY (removed_by_id
) REFERENCES public.
users(id);
2507 -- Name: repository_builds repository_builds_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2510 ALTER TABLE ONLY public.repository_builds
2511 ADD CONSTRAINT repository_builds_repo_id
FOREIGN KEY (repo_id
) REFERENCES public.
repositories(id);
2515 -- Name: sessions sessions_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2518 ALTER TABLE ONLY public.sessions
2519 ADD CONSTRAINT sessions_user_id
FOREIGN KEY (user_id
) REFERENCES public.
users(id);
2523 -- Name: source_commit_jobs source_commit_jobs_commit_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2526 ALTER TABLE ONLY public.source_commit_jobs
2527 ADD CONSTRAINT source_commit_jobs_commit_id
FOREIGN KEY (commit_id
) REFERENCES public.
source_commits(id);
2531 -- Name: source_commits source_commits_build_group_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2534 ALTER TABLE ONLY public.source_commits
2535 ADD CONSTRAINT source_commits_build_group_id
FOREIGN KEY (build_group_id
) REFERENCES public.
build_groups(id);
2539 -- Name: source_commits sources_commits_source_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2542 ALTER TABLE ONLY public.source_commits
2543 ADD CONSTRAINT sources_commits_source_id
FOREIGN KEY (source_id
) REFERENCES public.
sources(id);
2547 -- Name: sources sources_created_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2550 ALTER TABLE ONLY public.sources
2551 ADD CONSTRAINT sources_created_by
FOREIGN KEY (created_by_id
) REFERENCES public.
users(id);
2555 -- Name: sources sources_deleted_by; Type: FK CONSTRAINT; Schema: public; Owner: -
2558 ALTER TABLE ONLY public.sources
2559 ADD CONSTRAINT sources_deleted_by
FOREIGN KEY (deleted_by_id
) REFERENCES public.
users(id);
2563 -- Name: sources sources_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2566 ALTER TABLE ONLY public.sources
2567 ADD CONSTRAINT sources_repo_id
FOREIGN KEY (repo_id
) REFERENCES public.
repositories(id);
2571 -- Name: uploads uploads_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2574 ALTER TABLE ONLY public.uploads
2575 ADD CONSTRAINT uploads_builder_id
FOREIGN KEY (builder_id
) REFERENCES public.
builders(id);
2579 -- Name: uploads uploads_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2582 ALTER TABLE ONLY public.uploads
2583 ADD CONSTRAINT uploads_user_id
FOREIGN KEY (user_id
) REFERENCES public.
users(id);
2587 -- Name: user_push_subscriptions user_push_subscriptions_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2590 ALTER TABLE ONLY public.user_push_subscriptions
2591 ADD CONSTRAINT user_push_subscriptions_user_id
FOREIGN KEY (user_id
) REFERENCES public.
users(id);
2595 -- Name: SCHEMA public; Type: ACL; Schema: -; Owner: -
2598 REVOKE USAGE ON SCHEMA public FROM PUBLIC;
2599 GRANT ALL ON SCHEMA public TO PUBLIC;
2603 -- PostgreSQL database dump complete