2 -- PostgreSQL database dump
5 SET statement_timeout
= 0;
7 SET client_encoding
= 'UTF8';
8 SET standard_conforming_strings
= on;
9 SET check_function_bodies
= false;
10 SET client_min_messages
= warning
;
13 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
16 CREATE EXTENSION
IF NOT EXISTS plpgsql
WITH SCHEMA pg_catalog
;
20 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
23 COMMENT ON EXTENSION plpgsql
IS 'PL/pgSQL procedural language';
26 SET search_path
= public, pg_catalog
;
29 -- Name: arches_binary; Type: TYPE; Schema: public; Owner: pakfire
32 CREATE TYPE arches_binary
AS ENUM (
38 ALTER TYPE arches_binary
OWNER TO pakfire
;
41 -- Name: builders_arches_enabled; Type: TYPE; Schema: public; Owner: pakfire
44 CREATE TYPE builders_arches_enabled
AS ENUM (
50 ALTER TYPE builders_arches_enabled
OWNER TO pakfire
;
53 -- Name: builders_build_release; Type: TYPE; Schema: public; Owner: pakfire
56 CREATE TYPE builders_build_release
AS ENUM (
62 ALTER TYPE builders_build_release
OWNER TO pakfire
;
65 -- Name: builders_build_scratch; Type: TYPE; Schema: public; Owner: pakfire
68 CREATE TYPE builders_build_scratch
AS ENUM (
74 ALTER TYPE builders_build_scratch
OWNER TO pakfire
;
77 -- Name: builders_build_test; Type: TYPE; Schema: public; Owner: pakfire
80 CREATE TYPE builders_build_test
AS ENUM (
86 ALTER TYPE builders_build_test
OWNER TO pakfire
;
89 -- Name: builders_deleted; Type: TYPE; Schema: public; Owner: pakfire
92 CREATE TYPE builders_deleted
AS ENUM (
98 ALTER TYPE builders_deleted
OWNER TO pakfire
;
101 -- Name: builders_disabled; Type: TYPE; Schema: public; Owner: pakfire
104 CREATE TYPE builders_disabled
AS ENUM (
110 ALTER TYPE builders_disabled
OWNER TO pakfire
;
113 -- Name: builders_history_action; Type: TYPE; Schema: public; Owner: pakfire
116 CREATE TYPE builders_history_action
AS ENUM (
124 ALTER TYPE builders_history_action
OWNER TO pakfire
;
127 -- Name: builders_overload; Type: TYPE; Schema: public; Owner: pakfire
130 CREATE TYPE builders_overload
AS ENUM (
136 ALTER TYPE builders_overload
OWNER TO pakfire
;
139 -- Name: builders_status; Type: TYPE; Schema: public; Owner: pakfire
142 CREATE TYPE builders_status
AS ENUM (
149 ALTER TYPE builders_status
OWNER TO pakfire
;
152 -- Name: builds_auto_move; Type: TYPE; Schema: public; Owner: pakfire
155 CREATE TYPE builds_auto_move
AS ENUM (
161 ALTER TYPE builds_auto_move
OWNER TO pakfire
;
164 -- Name: builds_bugs_updates_error; Type: TYPE; Schema: public; Owner: pakfire
167 CREATE TYPE builds_bugs_updates_error
AS ENUM (
173 ALTER TYPE builds_bugs_updates_error
OWNER TO pakfire
;
176 -- Name: builds_history_action; Type: TYPE; Schema: public; Owner: pakfire
179 CREATE TYPE builds_history_action
AS ENUM (
186 ALTER TYPE builds_history_action
OWNER TO pakfire
;
189 -- Name: builds_public; Type: TYPE; Schema: public; Owner: pakfire
192 CREATE TYPE builds_public
AS ENUM (
198 ALTER TYPE builds_public
OWNER TO pakfire
;
201 -- Name: builds_severity; Type: TYPE; Schema: public; Owner: pakfire
204 CREATE TYPE builds_severity
AS ENUM (
212 ALTER TYPE builds_severity
OWNER TO pakfire
;
215 -- Name: builds_state; Type: TYPE; Schema: public; Owner: pakfire
218 CREATE TYPE builds_state
AS ENUM (
227 ALTER TYPE builds_state
OWNER TO pakfire
;
230 -- Name: builds_type; Type: TYPE; Schema: public; Owner: pakfire
233 CREATE TYPE builds_type
AS ENUM (
239 ALTER TYPE builds_type
OWNER TO pakfire
;
242 -- Name: filelists_config; Type: TYPE; Schema: public; Owner: pakfire
245 CREATE TYPE filelists_config
AS ENUM (
251 ALTER TYPE filelists_config
OWNER TO pakfire
;
254 -- Name: jobs_history_action; Type: TYPE; Schema: public; Owner: pakfire
257 CREATE TYPE jobs_history_action
AS ENUM (
266 ALTER TYPE jobs_history_action
OWNER TO pakfire
;
269 -- Name: jobs_history_state; Type: TYPE; Schema: public; Owner: pakfire
272 CREATE TYPE jobs_history_state
AS ENUM (
288 ALTER TYPE jobs_history_state
OWNER TO pakfire
;
291 -- Name: jobs_state; Type: TYPE; Schema: public; Owner: pakfire
294 CREATE TYPE jobs_state
AS ENUM (
310 ALTER TYPE jobs_state
OWNER TO pakfire
;
313 -- Name: jobs_type; Type: TYPE; Schema: public; Owner: pakfire
316 CREATE TYPE jobs_type
AS ENUM (
322 ALTER TYPE jobs_type
OWNER TO pakfire
;
325 -- Name: mirrors_check_status; Type: TYPE; Schema: public; Owner: pakfire
328 CREATE TYPE mirrors_check_status
AS ENUM (
335 ALTER TYPE mirrors_check_status
OWNER TO pakfire
;
338 -- Name: mirrors_history_action; Type: TYPE; Schema: public; Owner: pakfire
341 CREATE TYPE mirrors_history_action
AS ENUM (
349 ALTER TYPE mirrors_history_action
OWNER TO pakfire
;
352 -- Name: mirrors_status; Type: TYPE; Schema: public; Owner: pakfire
355 CREATE TYPE mirrors_status
AS ENUM (
362 ALTER TYPE mirrors_status
OWNER TO pakfire
;
365 -- Name: packages_deps_type; Type: TYPE; Schema: public; Owner: pakfire
368 CREATE TYPE packages_deps_type
AS ENUM (
379 ALTER TYPE packages_deps_type
OWNER TO pakfire
;
382 -- Name: packages_properties_critical_path; Type: TYPE; Schema: public; Owner: pakfire
385 CREATE TYPE packages_properties_critical_path
AS ENUM (
391 ALTER TYPE packages_properties_critical_path
OWNER TO pakfire
;
394 -- Name: packages_type; Type: TYPE; Schema: public; Owner: pakfire
397 CREATE TYPE packages_type
AS ENUM (
403 ALTER TYPE packages_type
OWNER TO pakfire
;
406 -- Name: repositories_aux_status; Type: TYPE; Schema: public; Owner: pakfire
409 CREATE TYPE repositories_aux_status
AS ENUM (
415 ALTER TYPE repositories_aux_status
OWNER TO pakfire
;
418 -- Name: repositories_enabled_for_builds; Type: TYPE; Schema: public; Owner: pakfire
421 CREATE TYPE repositories_enabled_for_builds
AS ENUM (
427 ALTER TYPE repositories_enabled_for_builds
OWNER TO pakfire
;
430 -- Name: repositories_history_action; Type: TYPE; Schema: public; Owner: pakfire
433 CREATE TYPE repositories_history_action
AS ENUM (
440 ALTER TYPE repositories_history_action
OWNER TO pakfire
;
443 -- Name: repositories_mirrored; Type: TYPE; Schema: public; Owner: pakfire
446 CREATE TYPE repositories_mirrored
AS ENUM (
452 ALTER TYPE repositories_mirrored
OWNER TO pakfire
;
455 -- Name: repositories_type; Type: TYPE; Schema: public; Owner: pakfire
458 CREATE TYPE repositories_type
AS ENUM (
465 ALTER TYPE repositories_type
OWNER TO pakfire
;
468 -- Name: sources_commits_state; Type: TYPE; Schema: public; Owner: pakfire
471 CREATE TYPE sources_commits_state
AS ENUM (
479 ALTER TYPE sources_commits_state
OWNER TO pakfire
;
482 -- Name: uploads_finished; Type: TYPE; Schema: public; Owner: pakfire
485 CREATE TYPE uploads_finished
AS ENUM (
491 ALTER TYPE uploads_finished
OWNER TO pakfire
;
494 -- Name: users_activated; Type: TYPE; Schema: public; Owner: pakfire
497 CREATE TYPE users_activated
AS ENUM (
503 ALTER TYPE users_activated
OWNER TO pakfire
;
506 -- Name: users_deleted; Type: TYPE; Schema: public; Owner: pakfire
509 CREATE TYPE users_deleted
AS ENUM (
515 ALTER TYPE users_deleted
OWNER TO pakfire
;
518 -- Name: users_emails_primary; Type: TYPE; Schema: public; Owner: pakfire
521 CREATE TYPE users_emails_primary
AS ENUM (
527 ALTER TYPE users_emails_primary
OWNER TO pakfire
;
530 -- Name: users_permissions_create_scratch_builds; Type: TYPE; Schema: public; Owner: pakfire
533 CREATE TYPE users_permissions_create_scratch_builds
AS ENUM (
539 ALTER TYPE users_permissions_create_scratch_builds
OWNER TO pakfire
;
542 -- Name: users_permissions_maintain_builders; Type: TYPE; Schema: public; Owner: pakfire
545 CREATE TYPE users_permissions_maintain_builders
AS ENUM (
551 ALTER TYPE users_permissions_maintain_builders
OWNER TO pakfire
;
554 -- Name: users_permissions_manage_critical_path; Type: TYPE; Schema: public; Owner: pakfire
557 CREATE TYPE users_permissions_manage_critical_path
AS ENUM (
563 ALTER TYPE users_permissions_manage_critical_path
OWNER TO pakfire
;
566 -- Name: users_permissions_manage_mirrors; Type: TYPE; Schema: public; Owner: pakfire
569 CREATE TYPE users_permissions_manage_mirrors
AS ENUM (
575 ALTER TYPE users_permissions_manage_mirrors
OWNER TO pakfire
;
578 -- Name: users_permissions_vote; Type: TYPE; Schema: public; Owner: pakfire
581 CREATE TYPE users_permissions_vote
AS ENUM (
587 ALTER TYPE users_permissions_vote
OWNER TO pakfire
;
590 -- Name: users_state; Type: TYPE; Schema: public; Owner: pakfire
593 CREATE TYPE users_state
AS ENUM (
600 ALTER TYPE users_state
OWNER TO pakfire
;
603 -- Name: on_update_current_timestamp_sources(); Type: FUNCTION; Schema: public; Owner: pakfire
606 CREATE FUNCTION on_update_current_timestamp_sources() RETURNS trigger
616 ALTER FUNCTION public.
on_update_current_timestamp_sources() OWNER TO pakfire
;
618 SET default_tablespace
= '';
620 SET default_with_oids
= false;
623 -- Name: arches; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
626 CREATE TABLE arches (
629 prio
integer DEFAULT 0 NOT NULL,
630 "binary" arches_binary
DEFAULT 'Y'::arches_binary NOT NULL,
635 ALTER TABLE arches
OWNER TO pakfire
;
638 -- Name: arches_compat; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
641 CREATE TABLE arches_compat (
642 host_arch
text NOT NULL,
643 build_arch
text NOT NULL
647 ALTER TABLE arches_compat
OWNER TO pakfire
;
650 -- Name: builders; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
653 CREATE TABLE builders (
658 status builders_status
DEFAULT 'disabled'::builders_status NOT NULL,
659 disabled builders_disabled
DEFAULT 'Y'::builders_disabled NOT NULL,
660 loadavg
text DEFAULT '0'::character varying NOT NULL,
662 build_release builders_build_release
DEFAULT 'N'::builders_build_release NOT NULL,
663 build_scratch builders_build_scratch
DEFAULT 'N'::builders_build_scratch NOT NULL,
664 build_test builders_build_test
DEFAULT 'N'::builders_build_test NOT NULL,
665 max_jobs
bigint DEFAULT 1::bigint NOT NULL,
666 pakfire_version
text,
669 cpu_count
integer DEFAULT 1 NOT NULL,
671 cpu_bogomips
double precision,
672 memory
bigint DEFAULT 0 NOT NULL,
673 overload builders_overload
DEFAULT 'N'::builders_overload NOT NULL,
674 free_space
bigint DEFAULT 0 NOT NULL,
676 deleted builders_deleted
DEFAULT 'N'::builders_deleted NOT NULL,
677 time_created
timestamp without time zone NOT NULL,
678 time_updated
timestamp without time zone,
679 time_keepalive
timestamp without time zone,
680 loadavg1
double precision,
681 loadavg5
double precision,
682 loadavg15
double precision,
691 ALTER TABLE builders
OWNER TO pakfire
;
694 -- Name: arches_builders; Type: VIEW; Schema: public; Owner: pakfire
697 CREATE VIEW arches_builders
AS
698 SELECT arches_compat.build_arch
AS arch
,
699 builders.
id AS builder_id
701 LEFT JOIN builders
ON ((arches_compat.host_arch
= builders.cpu_arch
)));
704 ALTER TABLE arches_builders
OWNER TO pakfire
;
707 -- Name: arches_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
710 CREATE SEQUENCE arches_id_seq
718 ALTER TABLE arches_id_seq
OWNER TO pakfire
;
721 -- Name: arches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
724 ALTER SEQUENCE arches_id_seq
OWNED BY arches.
id;
728 -- Name: builders_history; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
731 CREATE TABLE builders_history (
733 builder_id
integer NOT NULL,
734 action builders_history_action
NOT NULL,
736 "time" timestamp without time zone NOT NULL
740 ALTER TABLE builders_history
OWNER TO pakfire
;
743 -- Name: builders_history_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
746 CREATE SEQUENCE builders_history_id_seq
754 ALTER TABLE builders_history_id_seq
OWNER TO pakfire
;
757 -- Name: builders_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
760 ALTER SEQUENCE builders_history_id_seq
OWNED BY builders_history.
id;
764 -- Name: builders_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
767 CREATE SEQUENCE builders_id_seq
775 ALTER TABLE builders_id_seq
OWNER TO pakfire
;
778 -- Name: builders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
781 ALTER SEQUENCE builders_id_seq
OWNED BY builders.
id;
785 -- Name: jobs; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
791 type jobs_type
DEFAULT 'build'::jobs_type NOT NULL,
792 build_id
integer NOT NULL,
793 state jobs_state
DEFAULT 'new'::jobs_state NOT NULL,
795 time_created
timestamp without time zone NOT NULL,
796 time_started
timestamp without time zone,
797 time_finished
timestamp without time zone,
798 start_not_before
timestamp without time zone,
800 tries
integer DEFAULT 0 NOT NULL,
801 aborted_state
integer DEFAULT 0 NOT NULL,
806 ALTER TABLE jobs
OWNER TO pakfire
;
809 -- Name: jobs_active; Type: VIEW; Schema: public; Owner: pakfire
812 CREATE VIEW jobs_active
AS
822 jobs.start_not_before
,
828 WHERE (jobs.
state = ANY (ARRAY['dispatching'::jobs_state, 'running'::jobs_state, 'uploading'::jobs_state]))
829 ORDER BY jobs.time_started
;
832 ALTER TABLE jobs_active
OWNER TO pakfire
;
835 -- Name: builders_ready; Type: VIEW; Schema: public; Owner: pakfire
838 CREATE VIEW builders_ready
AS
839 SELECT builders.
id AS builder_id
,
840 builders.cpu_arch
AS builder_arch
,
841 builders.build_release
,
842 builders.build_scratch
,
845 WHERE (((builders.status
= 'enabled'::builders_status) AND (builders.time_keepalive
>= (now() - '00:05:00'::interval))) AND (builders.max_jobs
> ( SELECT count(*) AS count
847 WHERE (jobs_active.builder_id
= builders.
id))))
848 ORDER BY ( SELECT count(*) AS count
850 WHERE (jobs_active.builder_id
= builders.
id)), builders.cpu_bogomips
DESC;
853 ALTER TABLE builders_ready
OWNER TO pakfire
;
856 -- Name: builds; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
859 CREATE TABLE builds (
862 pkg_id
integer NOT NULL,
863 type builds_type
DEFAULT 'release'::builds_type NOT NULL,
864 state builds_state
DEFAULT 'building'::builds_state NOT NULL,
865 severity builds_severity
,
867 time_created
timestamp without time zone NOT NULL,
871 distro_id
integer NOT NULL,
873 public builds_public
DEFAULT 'Y'::builds_public NOT NULL,
874 priority
integer DEFAULT 0 NOT NULL,
875 auto_move builds_auto_move
DEFAULT 'N'::builds_auto_move NOT NULL
879 ALTER TABLE builds
OWNER TO pakfire
;
882 -- Name: builds_bugs; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
885 CREATE TABLE builds_bugs (
887 build_id
integer NOT NULL,
888 bug_id
integer NOT NULL
892 ALTER TABLE builds_bugs
OWNER TO pakfire
;
895 -- Name: builds_bugs_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
898 CREATE SEQUENCE builds_bugs_id_seq
906 ALTER TABLE builds_bugs_id_seq
OWNER TO pakfire
;
909 -- Name: builds_bugs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
912 ALTER SEQUENCE builds_bugs_id_seq
OWNED BY builds_bugs.
id;
916 -- Name: builds_bugs_updates; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
919 CREATE TABLE builds_bugs_updates (
921 bug_id
integer NOT NULL,
925 "time" timestamp without time zone NOT NULL,
926 error builds_bugs_updates_error
DEFAULT 'N'::builds_bugs_updates_error NOT NULL,
931 ALTER TABLE builds_bugs_updates
OWNER TO pakfire
;
934 -- Name: builds_bugs_updates_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
937 CREATE SEQUENCE builds_bugs_updates_id_seq
945 ALTER TABLE builds_bugs_updates_id_seq
OWNER TO pakfire
;
948 -- Name: builds_bugs_updates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
951 ALTER SEQUENCE builds_bugs_updates_id_seq
OWNED BY builds_bugs_updates.
id;
955 -- Name: builds_comments; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
958 CREATE TABLE builds_comments (
960 build_id
integer NOT NULL,
961 user_id
integer NOT NULL,
963 credit
integer NOT NULL,
964 time_created
timestamp without time zone NOT NULL,
965 time_updated
timestamp without time zone
969 ALTER TABLE builds_comments
OWNER TO pakfire
;
972 -- Name: builds_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
975 CREATE SEQUENCE builds_comments_id_seq
983 ALTER TABLE builds_comments_id_seq
OWNER TO pakfire
;
986 -- Name: builds_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
989 ALTER SEQUENCE builds_comments_id_seq
OWNED BY builds_comments.
id;
993 -- Name: builds_history; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
996 CREATE TABLE builds_history (
998 build_id
integer NOT NULL,
999 action builds_history_action
NOT NULL,
1001 "time" timestamp without time zone NOT NULL,
1006 ALTER TABLE builds_history
OWNER TO pakfire
;
1009 -- Name: builds_history_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1012 CREATE SEQUENCE builds_history_id_seq
1020 ALTER TABLE builds_history_id_seq
OWNER TO pakfire
;
1023 -- Name: builds_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1026 ALTER SEQUENCE builds_history_id_seq
OWNED BY builds_history.
id;
1030 -- Name: builds_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1033 CREATE SEQUENCE builds_id_seq
1041 ALTER TABLE builds_id_seq
OWNER TO pakfire
;
1044 -- Name: builds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1047 ALTER SEQUENCE builds_id_seq
OWNED BY builds.
id;
1051 -- Name: packages; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1054 CREATE TABLE packages (
1055 id integer NOT NULL,
1057 epoch
integer NOT NULL,
1058 version text NOT NULL,
1059 release text NOT NULL,
1060 type packages_type
NOT NULL,
1061 arch
integer NOT NULL,
1062 groups
text NOT NULL,
1063 maintainer
text NOT NULL,
1064 license
text NOT NULL,
1066 summary
text NOT NULL,
1067 description
text NOT NULL,
1068 size bigint NOT NULL,
1069 supported_arches
text,
1072 build_id
text NOT NULL,
1073 build_host
text NOT NULL,
1074 build_time
timestamp without time zone NOT NULL,
1076 filesize
bigint NOT NULL,
1077 hash_sha512
text NOT NULL
1081 ALTER TABLE packages
OWNER TO pakfire
;
1084 -- Name: repositories_builds; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1087 CREATE TABLE repositories_builds (
1088 id integer NOT NULL,
1089 repo_id
integer NOT NULL,
1090 build_id
bigint NOT NULL,
1091 time_added
timestamp without time zone NOT NULL
1095 ALTER TABLE repositories_builds
OWNER TO pakfire
;
1098 -- Name: builds_latest; Type: VIEW; Schema: public; Owner: pakfire
1101 CREATE VIEW builds_latest
AS
1102 SELECT builds.
id AS build_id
,
1103 builds.
type AS build_type
,
1104 builds.
state AS build_state
,
1105 packages.
name AS package_name
,
1108 LEFT JOIN packages
ON ((builds.pkg_id
= packages.
id)))
1109 WHERE ((builds.
id IN ( SELECT repositories_builds.build_id
1110 FROM repositories_builds
)) OR ((builds.time_created
>= ( SELECT builds_1.time_created
1111 FROM ((builds builds_1
1112 LEFT JOIN repositories_builds
ON ((builds_1.
id = repositories_builds.build_id
)))
1113 LEFT JOIN packages p
ON ((builds_1.pkg_id
= p.
id)))
1114 WHERE (p.
name = packages.
name)
1115 ORDER BY builds_1.time_created
1116 LIMIT 1)) AND (builds.
state <> ALL (ARRAY['obsolete'::builds_state, 'broken'::builds_state]))));
1119 ALTER TABLE builds_latest
OWNER TO pakfire
;
1122 -- Name: builds_times; Type: VIEW; Schema: public; Owner: pakfire
1125 CREATE VIEW builds_times
AS
1126 SELECT builds.
id AS build_id
,
1129 jobs.
type AS job_type
,
1130 (jobs.time_finished
- jobs.time_started
) AS duration
1132 LEFT JOIN builds
ON ((jobs.build_id
= builds.
id)))
1133 LEFT JOIN packages
ON ((builds.pkg_id
= packages.
id)))
1134 LEFT JOIN arches
ON ((jobs.arch
= arches.
name)))
1135 WHERE (jobs.
state = 'finished'::jobs_state);
1138 ALTER TABLE builds_times
OWNER TO pakfire
;
1141 -- Name: builds_watchers; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1144 CREATE TABLE builds_watchers (
1145 id integer NOT NULL,
1146 build_id
integer NOT NULL,
1147 user_id
integer NOT NULL
1151 ALTER TABLE builds_watchers
OWNER TO pakfire
;
1154 -- Name: builds_watchers_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1157 CREATE SEQUENCE builds_watchers_id_seq
1165 ALTER TABLE builds_watchers_id_seq
OWNER TO pakfire
;
1168 -- Name: builds_watchers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1171 ALTER SEQUENCE builds_watchers_id_seq
OWNED BY builds_watchers.
id;
1175 -- Name: distributions; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1178 CREATE TABLE distributions (
1179 id integer NOT NULL,
1181 sname
text NOT NULL,
1182 slogan
text NOT NULL,
1184 vendor
text NOT NULL,
1190 ALTER TABLE distributions
OWNER TO pakfire
;
1193 -- Name: distributions_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1196 CREATE SEQUENCE distributions_id_seq
1204 ALTER TABLE distributions_id_seq
OWNER TO pakfire
;
1207 -- Name: distributions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1210 ALTER SEQUENCE distributions_id_seq
OWNED BY distributions.
id;
1214 -- Name: distro_arches; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1217 CREATE TABLE distro_arches (
1218 id integer NOT NULL,
1219 distro_id
integer NOT NULL,
1220 arch_id
integer NOT NULL
1224 ALTER TABLE distro_arches
OWNER TO pakfire
;
1227 -- Name: distro_arches_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1230 CREATE SEQUENCE distro_arches_id_seq
1238 ALTER TABLE distro_arches_id_seq
OWNER TO pakfire
;
1241 -- Name: distro_arches_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1244 ALTER SEQUENCE distro_arches_id_seq
OWNED BY distro_arches.
id;
1248 -- Name: filelists; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1251 CREATE TABLE filelists (
1252 pkg_id
integer NOT NULL,
1254 size bigint NOT NULL,
1256 type integer NOT NULL,
1257 config filelists_config
NOT NULL,
1258 mode integer NOT NULL,
1259 "user" text NOT NULL,
1260 "group" text NOT NULL,
1261 mtime
timestamp without time zone NOT NULL,
1266 ALTER TABLE filelists
OWNER TO pakfire
;
1269 -- Name: images_types; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1272 CREATE TABLE images_types (
1273 id integer NOT NULL,
1278 ALTER TABLE images_types
OWNER TO pakfire
;
1281 -- Name: images_types_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1284 CREATE SEQUENCE images_types_id_seq
1292 ALTER TABLE images_types_id_seq
OWNER TO pakfire
;
1295 -- Name: images_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1298 ALTER SEQUENCE images_types_id_seq
OWNED BY images_types.
id;
1302 -- Name: jobs_buildroots; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1305 CREATE TABLE jobs_buildroots (
1306 job_id
integer NOT NULL,
1307 tries
integer NOT NULL,
1308 pkg_uuid
text NOT NULL,
1309 pkg_name
text NOT NULL
1313 ALTER TABLE jobs_buildroots
OWNER TO pakfire
;
1316 -- Name: jobs_history; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1319 CREATE TABLE jobs_history (
1320 job_id
integer NOT NULL,
1321 action jobs_history_action
NOT NULL,
1322 state jobs_history_state
,
1324 "time" timestamp without time zone NOT NULL,
1330 ALTER TABLE jobs_history
OWNER TO pakfire
;
1333 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1336 CREATE SEQUENCE jobs_id_seq
1344 ALTER TABLE jobs_id_seq
OWNER TO pakfire
;
1347 -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1350 ALTER SEQUENCE jobs_id_seq
OWNED BY jobs.
id;
1354 -- Name: jobs_packages; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1357 CREATE TABLE jobs_packages (
1358 id integer NOT NULL,
1359 job_id
integer NOT NULL,
1360 pkg_id
integer NOT NULL
1364 ALTER TABLE jobs_packages
OWNER TO pakfire
;
1367 -- Name: jobs_packages_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1370 CREATE SEQUENCE jobs_packages_id_seq
1378 ALTER TABLE jobs_packages_id_seq
OWNER TO pakfire
;
1381 -- Name: jobs_packages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1384 ALTER SEQUENCE jobs_packages_id_seq
OWNED BY jobs_packages.
id;
1388 -- Name: jobs_queue; Type: VIEW; Schema: public; Owner: pakfire
1391 CREATE VIEW jobs_queue
AS
1393 arches.
name AS arch
,
1394 ( SELECT builders_ready.builder_id
1396 WHERE (builders_ready.builder_id
IN ( SELECT arches_builders.builder_id
1397 FROM arches_builders
1398 WHERE ((arches_builders.arch
= arches.
name) AND
1400 WHEN ((builds.
type = 'release'::builds_type) AND (jobs.
type = 'build'::jobs_type)) THEN (builders_ready.build_release
= 'Y'::builders_build_release)
1401 WHEN ((builds.
type = 'scratch'::builds_type) AND (jobs.
type = 'build'::jobs_type)) THEN (builders_ready.build_scratch
= 'Y'::builders_build_scratch)
1402 WHEN (jobs.
type = 'test'::jobs_type) THEN (builders_ready.build_test
= 'Y'::builders_build_test)
1405 LIMIT 1) AS designated_builder_id
1407 LEFT JOIN arches
ON ((jobs.arch
= arches.
name)))
1408 LEFT JOIN builds
ON ((jobs.build_id
= builds.
id)))
1409 WHERE ((jobs.
state = ANY (ARRAY['pending'::jobs_state, 'new'::jobs_state])) AND ((jobs.start_not_before
IS NULL) OR (jobs.start_not_before
<= now())))
1412 WHEN (jobs.
type = 'build'::jobs_type) THEN 0
1413 WHEN (jobs.
type = 'test'::jobs_type) THEN 1
1415 END, builds.priority
DESC, jobs.tries
, jobs.time_created
;
1418 ALTER TABLE jobs_queue
OWNER TO pakfire
;
1421 -- Name: jobs_repos; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1424 CREATE TABLE jobs_repos (
1425 job_id
integer NOT NULL,
1426 repo_id
integer NOT NULL
1430 ALTER TABLE jobs_repos
OWNER TO pakfire
;
1433 -- Name: jobs_waiting; Type: VIEW; Schema: public; Owner: pakfire
1436 CREATE VIEW jobs_waiting
AS
1437 SELECT jobs_queue.
id,
1438 (now() - (jobs.time_created
)::timestamp with time zone) AS time_waiting
1440 LEFT JOIN jobs
ON ((jobs_queue.
id = jobs.
id)))
1441 WHERE (jobs.start_not_before
IS NULL)
1443 SELECT jobs_queue.
id,
1444 (now() - (jobs.start_not_before
)::timestamp with time zone) AS time_waiting
1446 LEFT JOIN jobs
ON ((jobs_queue.
id = jobs.
id)))
1447 WHERE (jobs.start_not_before
IS NOT NULL);
1450 ALTER TABLE jobs_waiting
OWNER TO pakfire
;
1453 -- Name: keys; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1457 id integer NOT NULL,
1458 fingerprint
text NOT NULL,
1464 ALTER TABLE keys
OWNER TO pakfire
;
1467 -- Name: keys_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1470 CREATE SEQUENCE keys_id_seq
1478 ALTER TABLE keys_id_seq
OWNER TO pakfire
;
1481 -- Name: keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1484 ALTER SEQUENCE keys_id_seq
OWNED BY keys.
id;
1488 -- Name: keys_subkeys; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1491 CREATE TABLE keys_subkeys (
1492 id integer NOT NULL,
1493 key_id
integer NOT NULL,
1494 fingerprint
text NOT NULL,
1495 time_created
timestamp without time zone NOT NULL,
1496 time_expires
timestamp without time zone,
1501 ALTER TABLE keys_subkeys
OWNER TO pakfire
;
1504 -- Name: keys_subkeys_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1507 CREATE SEQUENCE keys_subkeys_id_seq
1515 ALTER TABLE keys_subkeys_id_seq
OWNER TO pakfire
;
1518 -- Name: keys_subkeys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1521 ALTER SEQUENCE keys_subkeys_id_seq
OWNED BY keys_subkeys.
id;
1525 -- Name: logfiles; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1528 CREATE TABLE logfiles (
1529 id integer NOT NULL,
1530 job_id
integer NOT NULL,
1532 filesize
bigint NOT NULL,
1533 hash_sha512
text NOT NULL
1537 ALTER TABLE logfiles
OWNER TO pakfire
;
1540 -- Name: logfiles_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1543 CREATE SEQUENCE logfiles_id_seq
1551 ALTER TABLE logfiles_id_seq
OWNER TO pakfire
;
1554 -- Name: logfiles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1557 ALTER SEQUENCE logfiles_id_seq
OWNED BY logfiles.
id;
1561 -- Name: mirrors; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1564 CREATE TABLE mirrors (
1565 id integer NOT NULL,
1566 hostname
text NOT NULL,
1570 deleted
boolean DEFAULT false NOT NULL
1574 ALTER TABLE mirrors
OWNER TO pakfire
;
1577 -- Name: mirrors_checks; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1580 CREATE TABLE mirrors_checks (
1581 id integer NOT NULL,
1582 mirror_id
integer NOT NULL,
1583 "timestamp" timestamp without time zone DEFAULT now() NOT NULL,
1584 response_time
double precision,
1585 http_status
integer,
1586 last_sync_at
timestamp without time zone,
1587 status
text DEFAULT 'OK'::text NOT NULL
1591 ALTER TABLE mirrors_checks
OWNER TO pakfire
;
1594 -- Name: mirrors_checks_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1597 CREATE SEQUENCE mirrors_checks_id_seq
1605 ALTER TABLE mirrors_checks_id_seq
OWNER TO pakfire
;
1608 -- Name: mirrors_checks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1611 ALTER SEQUENCE mirrors_checks_id_seq
OWNED BY mirrors_checks.
id;
1615 -- Name: mirrors_history; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1618 CREATE TABLE mirrors_history (
1619 id integer NOT NULL,
1620 mirror_id
integer NOT NULL,
1621 action mirrors_history_action
NOT NULL,
1623 "time" timestamp without time zone NOT NULL
1627 ALTER TABLE mirrors_history
OWNER TO pakfire
;
1630 -- Name: mirrors_history_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1633 CREATE SEQUENCE mirrors_history_id_seq
1641 ALTER TABLE mirrors_history_id_seq
OWNER TO pakfire
;
1644 -- Name: mirrors_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1647 ALTER SEQUENCE mirrors_history_id_seq
OWNED BY mirrors_history.
id;
1651 -- Name: mirrors_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1654 CREATE SEQUENCE mirrors_id_seq
1662 ALTER TABLE mirrors_id_seq
OWNER TO pakfire
;
1665 -- Name: mirrors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1668 ALTER SEQUENCE mirrors_id_seq
OWNED BY mirrors.
id;
1672 -- Name: packages_deps; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1675 CREATE TABLE packages_deps (
1676 pkg_id
integer NOT NULL,
1677 type packages_deps_type
NOT NULL,
1682 ALTER TABLE packages_deps
OWNER TO pakfire
;
1685 -- Name: packages_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1688 CREATE SEQUENCE packages_id_seq
1696 ALTER TABLE packages_id_seq
OWNER TO pakfire
;
1699 -- Name: packages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1702 ALTER SEQUENCE packages_id_seq
OWNED BY packages.
id;
1706 -- Name: packages_properties; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1709 CREATE TABLE packages_properties (
1710 id integer NOT NULL,
1712 critical_path packages_properties_critical_path
DEFAULT 'N'::packages_properties_critical_path NOT NULL,
1713 priority
integer DEFAULT 0 NOT NULL
1717 ALTER TABLE packages_properties
OWNER TO pakfire
;
1720 -- Name: packages_properties_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1723 CREATE SEQUENCE packages_properties_id_seq
1731 ALTER TABLE packages_properties_id_seq
OWNER TO pakfire
;
1734 -- Name: packages_properties_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1737 ALTER SEQUENCE packages_properties_id_seq
OWNED BY packages_properties.
id;
1741 -- Name: queue_delete; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1744 CREATE TABLE queue_delete (
1745 id integer NOT NULL,
1750 ALTER TABLE queue_delete
OWNER TO pakfire
;
1753 -- Name: queue_delete_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1756 CREATE SEQUENCE queue_delete_id_seq
1764 ALTER TABLE queue_delete_id_seq
OWNER TO pakfire
;
1767 -- Name: queue_delete_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1770 ALTER SEQUENCE queue_delete_id_seq
OWNED BY queue_delete.
id;
1774 -- Name: relation_sizes; Type: VIEW; Schema: public; Owner: pakfire
1777 CREATE VIEW relation_sizes
AS
1778 SELECT c.relname
AS relation
,
1779 pg_size_pretty(pg_relation_size((c.oid
)::regclass)) AS size
1781 LEFT JOIN pg_namespace n
ON ((n.oid
= c.relnamespace
)))
1782 WHERE (n.nspname
<> ALL (ARRAY['pg_catalog'::name, 'information_schema'::name]))
1783 ORDER BY pg_relation_size((c.oid
)::regclass) DESC;
1786 ALTER TABLE relation_sizes
OWNER TO pakfire
;
1789 -- Name: repositories; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1792 CREATE TABLE repositories (
1793 id integer NOT NULL,
1795 type repositories_type
DEFAULT 'testing'::repositories_type NOT NULL,
1796 description
text NOT NULL,
1797 distro_id
integer NOT NULL,
1800 mirrored repositories_mirrored
DEFAULT 'N'::repositories_mirrored NOT NULL,
1801 enabled_for_builds repositories_enabled_for_builds
DEFAULT 'N'::repositories_enabled_for_builds NOT NULL,
1802 score_needed
integer DEFAULT 0 NOT NULL,
1803 last_update
timestamp without time zone,
1804 time_min
integer DEFAULT 0 NOT NULL,
1805 time_max
integer DEFAULT 0 NOT NULL,
1806 update_started
timestamp without time zone,
1807 update_ended
timestamp without time zone
1811 ALTER TABLE repositories
OWNER TO pakfire
;
1814 -- Name: repositories_aux; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1817 CREATE TABLE repositories_aux (
1818 id integer NOT NULL,
1822 distro_id
integer NOT NULL,
1823 status repositories_aux_status
DEFAULT 'disabled'::repositories_aux_status NOT NULL
1827 ALTER TABLE repositories_aux
OWNER TO pakfire
;
1830 -- Name: repositories_aux_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1833 CREATE SEQUENCE repositories_aux_id_seq
1841 ALTER TABLE repositories_aux_id_seq
OWNER TO pakfire
;
1844 -- Name: repositories_aux_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1847 ALTER SEQUENCE repositories_aux_id_seq
OWNED BY repositories_aux.
id;
1851 -- Name: repositories_builds_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1854 CREATE SEQUENCE repositories_builds_id_seq
1862 ALTER TABLE repositories_builds_id_seq
OWNER TO pakfire
;
1865 -- Name: repositories_builds_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1868 ALTER SEQUENCE repositories_builds_id_seq
OWNED BY repositories_builds.
id;
1872 -- Name: repositories_history; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1875 CREATE TABLE repositories_history (
1876 build_id
bigint NOT NULL,
1877 action repositories_history_action
NOT NULL,
1878 from_repo_id
integer,
1881 "time" timestamp without time zone NOT NULL
1885 ALTER TABLE repositories_history
OWNER TO pakfire
;
1888 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1891 CREATE SEQUENCE repositories_id_seq
1899 ALTER TABLE repositories_id_seq
OWNER TO pakfire
;
1902 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1905 ALTER SEQUENCE repositories_id_seq
OWNED BY repositories.
id;
1909 -- Name: sessions; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1912 CREATE TABLE sessions (
1913 id integer NOT NULL,
1914 session_id
text NOT NULL,
1915 created_at
timestamp without time zone DEFAULT now() NOT NULL,
1916 valid_until
timestamp without time zone DEFAULT (now() + '7 days'::interval) NOT NULL,
1917 user_id
integer NOT NULL,
1918 impersonated_user_id
integer,
1921 CONSTRAINT sessions_impersonation_check
CHECK (((impersonated_user_id
IS NULL) OR (user_id
<> impersonated_user_id
)))
1925 ALTER TABLE sessions
OWNER TO pakfire
;
1928 -- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1931 CREATE SEQUENCE sessions_id_seq
1939 ALTER TABLE sessions_id_seq
OWNER TO pakfire
;
1942 -- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1945 ALTER SEQUENCE sessions_id_seq
OWNED BY sessions.
id;
1949 -- Name: settings; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1952 CREATE TABLE settings (
1958 ALTER TABLE settings
OWNER TO pakfire
;
1961 -- Name: slogans; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1964 CREATE TABLE slogans (
1965 id integer NOT NULL,
1966 message
text NOT NULL
1970 ALTER TABLE slogans
OWNER TO pakfire
;
1973 -- Name: slogans_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
1976 CREATE SEQUENCE slogans_id_seq
1984 ALTER TABLE slogans_id_seq
OWNER TO pakfire
;
1987 -- Name: slogans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
1990 ALTER SEQUENCE slogans_id_seq
OWNED BY slogans.
id;
1994 -- Name: sources; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
1997 CREATE TABLE sources (
1998 id integer NOT NULL,
2000 identifier
text NOT NULL,
2003 revision
text NOT NULL,
2004 branch
text NOT NULL,
2005 updated
timestamp without time zone,
2006 distro_id
integer NOT NULL
2010 ALTER TABLE sources
OWNER TO pakfire
;
2013 -- Name: sources_commits; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
2016 CREATE TABLE sources_commits (
2017 id integer NOT NULL,
2018 source_id
integer NOT NULL,
2019 revision
text NOT NULL,
2020 author
text NOT NULL,
2021 committer
text NOT NULL,
2022 subject
text NOT NULL,
2024 date timestamp without time zone NOT NULL,
2025 state sources_commits_state
DEFAULT 'pending'::sources_commits_state NOT NULL
2029 ALTER TABLE sources_commits
OWNER TO pakfire
;
2032 -- Name: sources_commits_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
2035 CREATE SEQUENCE sources_commits_id_seq
2043 ALTER TABLE sources_commits_id_seq
OWNER TO pakfire
;
2046 -- Name: sources_commits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
2049 ALTER SEQUENCE sources_commits_id_seq
OWNED BY sources_commits.
id;
2053 -- Name: sources_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
2056 CREATE SEQUENCE sources_id_seq
2064 ALTER TABLE sources_id_seq
OWNER TO pakfire
;
2067 -- Name: sources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
2070 ALTER SEQUENCE sources_id_seq
OWNED BY sources.
id;
2074 -- Name: uploads; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
2077 CREATE TABLE uploads (
2078 id integer NOT NULL,
2082 filename
text NOT NULL,
2084 size bigint NOT NULL,
2085 progress
bigint DEFAULT 0 NOT NULL,
2086 finished uploads_finished
DEFAULT 'N'::uploads_finished NOT NULL,
2087 time_started
timestamp without time zone DEFAULT now() NOT NULL,
2088 time_finished
timestamp without time zone
2092 ALTER TABLE uploads
OWNER TO pakfire
;
2095 -- Name: uploads_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
2098 CREATE SEQUENCE uploads_id_seq
2106 ALTER TABLE uploads_id_seq
OWNER TO pakfire
;
2109 -- Name: uploads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
2112 ALTER SEQUENCE uploads_id_seq
OWNED BY uploads.
id;
2116 -- Name: user_messages; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
2119 CREATE TABLE user_messages (
2120 id integer NOT NULL,
2123 subject
text NOT NULL,
2125 time_added
timestamp without time zone DEFAULT now() NOT NULL
2129 ALTER TABLE user_messages
OWNER TO pakfire
;
2132 -- Name: user_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
2135 CREATE SEQUENCE user_messages_id_seq
2143 ALTER TABLE user_messages_id_seq
OWNER TO pakfire
;
2146 -- Name: user_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
2149 ALTER SEQUENCE user_messages_id_seq
OWNED BY user_messages.
id;
2153 -- Name: users; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
2156 CREATE TABLE users (
2157 id integer NOT NULL,
2160 passphrase
text NOT NULL,
2161 state users_state
NOT NULL,
2164 activated users_activated
DEFAULT 'N'::users_activated NOT NULL,
2165 activation_code
text,
2166 deleted users_deleted
DEFAULT 'N'::users_deleted NOT NULL,
2167 registered
timestamp without time zone DEFAULT now() NOT NULL
2171 ALTER TABLE users
OWNER TO pakfire
;
2174 -- Name: users_emails; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
2177 CREATE TABLE users_emails (
2178 id integer NOT NULL,
2179 user_id
integer NOT NULL,
2180 email
text NOT NULL,
2181 "primary" users_emails_primary
DEFAULT 'N'::users_emails_primary NOT NULL
2185 ALTER TABLE users_emails
OWNER TO pakfire
;
2188 -- Name: users_emails_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
2191 CREATE SEQUENCE users_emails_id_seq
2199 ALTER TABLE users_emails_id_seq
OWNER TO pakfire
;
2202 -- Name: users_emails_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
2205 ALTER SEQUENCE users_emails_id_seq
OWNED BY users_emails.
id;
2209 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
2212 CREATE SEQUENCE users_id_seq
2220 ALTER TABLE users_id_seq
OWNER TO pakfire
;
2223 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
2226 ALTER SEQUENCE users_id_seq
OWNED BY users.
id;
2230 -- Name: users_permissions; Type: TABLE; Schema: public; Owner: pakfire; Tablespace:
2233 CREATE TABLE users_permissions (
2234 id integer NOT NULL,
2235 user_id
integer NOT NULL,
2236 create_scratch_builds users_permissions_create_scratch_builds
DEFAULT 'N'::users_permissions_create_scratch_builds NOT NULL,
2237 maintain_builders users_permissions_maintain_builders
DEFAULT 'N'::users_permissions_maintain_builders NOT NULL,
2238 manage_critical_path users_permissions_manage_critical_path
DEFAULT 'N'::users_permissions_manage_critical_path NOT NULL,
2239 manage_mirrors users_permissions_manage_mirrors
DEFAULT 'N'::users_permissions_manage_mirrors NOT NULL,
2240 vote users_permissions_vote
DEFAULT 'N'::users_permissions_vote NOT NULL
2244 ALTER TABLE users_permissions
OWNER TO pakfire
;
2247 -- Name: users_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: pakfire
2250 CREATE SEQUENCE users_permissions_id_seq
2258 ALTER TABLE users_permissions_id_seq
OWNER TO pakfire
;
2261 -- Name: users_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: pakfire
2264 ALTER SEQUENCE users_permissions_id_seq
OWNED BY users_permissions.
id;
2268 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2271 ALTER TABLE ONLY arches
ALTER COLUMN id SET DEFAULT nextval('arches_id_seq'::regclass);
2275 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2278 ALTER TABLE ONLY builders
ALTER COLUMN id SET DEFAULT nextval('builders_id_seq'::regclass);
2282 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2285 ALTER TABLE ONLY builders_history
ALTER COLUMN id SET DEFAULT nextval('builders_history_id_seq'::regclass);
2289 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2292 ALTER TABLE ONLY builds
ALTER COLUMN id SET DEFAULT nextval('builds_id_seq'::regclass);
2296 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2299 ALTER TABLE ONLY builds_bugs
ALTER COLUMN id SET DEFAULT nextval('builds_bugs_id_seq'::regclass);
2303 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2306 ALTER TABLE ONLY builds_bugs_updates
ALTER COLUMN id SET DEFAULT nextval('builds_bugs_updates_id_seq'::regclass);
2310 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2313 ALTER TABLE ONLY builds_comments
ALTER COLUMN id SET DEFAULT nextval('builds_comments_id_seq'::regclass);
2317 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2320 ALTER TABLE ONLY builds_history
ALTER COLUMN id SET DEFAULT nextval('builds_history_id_seq'::regclass);
2324 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2327 ALTER TABLE ONLY builds_watchers
ALTER COLUMN id SET DEFAULT nextval('builds_watchers_id_seq'::regclass);
2331 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2334 ALTER TABLE ONLY distributions
ALTER COLUMN id SET DEFAULT nextval('distributions_id_seq'::regclass);
2338 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2341 ALTER TABLE ONLY distro_arches
ALTER COLUMN id SET DEFAULT nextval('distro_arches_id_seq'::regclass);
2345 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2348 ALTER TABLE ONLY images_types
ALTER COLUMN id SET DEFAULT nextval('images_types_id_seq'::regclass);
2352 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2355 ALTER TABLE ONLY jobs
ALTER COLUMN id SET DEFAULT nextval('jobs_id_seq'::regclass);
2359 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2362 ALTER TABLE ONLY jobs_packages
ALTER COLUMN id SET DEFAULT nextval('jobs_packages_id_seq'::regclass);
2366 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2369 ALTER TABLE ONLY keys
ALTER COLUMN id SET DEFAULT nextval('keys_id_seq'::regclass);
2373 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2376 ALTER TABLE ONLY keys_subkeys
ALTER COLUMN id SET DEFAULT nextval('keys_subkeys_id_seq'::regclass);
2380 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2383 ALTER TABLE ONLY logfiles
ALTER COLUMN id SET DEFAULT nextval('logfiles_id_seq'::regclass);
2387 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2390 ALTER TABLE ONLY mirrors
ALTER COLUMN id SET DEFAULT nextval('mirrors_id_seq'::regclass);
2394 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2397 ALTER TABLE ONLY mirrors_checks
ALTER COLUMN id SET DEFAULT nextval('mirrors_checks_id_seq'::regclass);
2401 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2404 ALTER TABLE ONLY mirrors_history
ALTER COLUMN id SET DEFAULT nextval('mirrors_history_id_seq'::regclass);
2408 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2411 ALTER TABLE ONLY packages
ALTER COLUMN id SET DEFAULT nextval('packages_id_seq'::regclass);
2415 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2418 ALTER TABLE ONLY packages_properties
ALTER COLUMN id SET DEFAULT nextval('packages_properties_id_seq'::regclass);
2422 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2425 ALTER TABLE ONLY queue_delete
ALTER COLUMN id SET DEFAULT nextval('queue_delete_id_seq'::regclass);
2429 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2432 ALTER TABLE ONLY repositories
ALTER COLUMN id SET DEFAULT nextval('repositories_id_seq'::regclass);
2436 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2439 ALTER TABLE ONLY repositories_aux
ALTER COLUMN id SET DEFAULT nextval('repositories_aux_id_seq'::regclass);
2443 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2446 ALTER TABLE ONLY repositories_builds
ALTER COLUMN id SET DEFAULT nextval('repositories_builds_id_seq'::regclass);
2450 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2453 ALTER TABLE ONLY sessions
ALTER COLUMN id SET DEFAULT nextval('sessions_id_seq'::regclass);
2457 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2460 ALTER TABLE ONLY slogans
ALTER COLUMN id SET DEFAULT nextval('slogans_id_seq'::regclass);
2464 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2467 ALTER TABLE ONLY sources
ALTER COLUMN id SET DEFAULT nextval('sources_id_seq'::regclass);
2471 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2474 ALTER TABLE ONLY sources_commits
ALTER COLUMN id SET DEFAULT nextval('sources_commits_id_seq'::regclass);
2478 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2481 ALTER TABLE ONLY uploads
ALTER COLUMN id SET DEFAULT nextval('uploads_id_seq'::regclass);
2485 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2488 ALTER TABLE ONLY user_messages
ALTER COLUMN id SET DEFAULT nextval('user_messages_id_seq'::regclass);
2492 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2495 ALTER TABLE ONLY users
ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
2499 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2502 ALTER TABLE ONLY users_emails
ALTER COLUMN id SET DEFAULT nextval('users_emails_id_seq'::regclass);
2506 -- Name: id; Type: DEFAULT; Schema: public; Owner: pakfire
2509 ALTER TABLE ONLY users_permissions
ALTER COLUMN id SET DEFAULT nextval('users_permissions_id_seq'::regclass);
2513 -- Name: arches_name; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2516 ALTER TABLE ONLY arches
2517 ADD CONSTRAINT arches_name
UNIQUE (name);
2521 -- Name: idx_2197943_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2524 ALTER TABLE ONLY arches
2525 ADD CONSTRAINT idx_2197943_primary
PRIMARY KEY (id);
2529 -- Name: idx_2197954_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2532 ALTER TABLE ONLY builders
2533 ADD CONSTRAINT idx_2197954_primary
PRIMARY KEY (id);
2537 -- Name: idx_2197982_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2540 ALTER TABLE ONLY builders_history
2541 ADD CONSTRAINT idx_2197982_primary
PRIMARY KEY (id);
2545 -- Name: idx_2197988_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2548 ALTER TABLE ONLY builds
2549 ADD CONSTRAINT idx_2197988_primary
PRIMARY KEY (id);
2553 -- Name: idx_2198002_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2556 ALTER TABLE ONLY builds_bugs
2557 ADD CONSTRAINT idx_2198002_primary
PRIMARY KEY (id);
2561 -- Name: idx_2198008_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2564 ALTER TABLE ONLY builds_bugs_updates
2565 ADD CONSTRAINT idx_2198008_primary
PRIMARY KEY (id);
2569 -- Name: idx_2198018_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2572 ALTER TABLE ONLY builds_comments
2573 ADD CONSTRAINT idx_2198018_primary
PRIMARY KEY (id);
2577 -- Name: idx_2198027_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2580 ALTER TABLE ONLY builds_history
2581 ADD CONSTRAINT idx_2198027_primary
PRIMARY KEY (id);
2585 -- Name: idx_2198033_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2588 ALTER TABLE ONLY builds_watchers
2589 ADD CONSTRAINT idx_2198033_primary
PRIMARY KEY (id);
2593 -- Name: idx_2198039_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2596 ALTER TABLE ONLY distributions
2597 ADD CONSTRAINT idx_2198039_primary
PRIMARY KEY (id);
2601 -- Name: idx_2198048_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2604 ALTER TABLE ONLY distro_arches
2605 ADD CONSTRAINT idx_2198048_primary
PRIMARY KEY (id);
2609 -- Name: idx_2198057_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2612 ALTER TABLE ONLY images_types
2613 ADD CONSTRAINT idx_2198057_primary
PRIMARY KEY (id);
2617 -- Name: idx_2198063_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2620 ALTER TABLE ONLY jobs
2621 ADD CONSTRAINT idx_2198063_primary
PRIMARY KEY (id);
2625 -- Name: idx_2198085_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2628 ALTER TABLE ONLY jobs_packages
2629 ADD CONSTRAINT idx_2198085_primary
PRIMARY KEY (id);
2633 -- Name: idx_2198094_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2636 ALTER TABLE ONLY keys
2637 ADD CONSTRAINT idx_2198094_primary
PRIMARY KEY (id);
2641 -- Name: idx_2198103_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2644 ALTER TABLE ONLY keys_subkeys
2645 ADD CONSTRAINT idx_2198103_primary
PRIMARY KEY (id);
2649 -- Name: idx_2198109_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2652 ALTER TABLE ONLY logfiles
2653 ADD CONSTRAINT idx_2198109_primary
PRIMARY KEY (id);
2657 -- Name: idx_2198115_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2660 ALTER TABLE ONLY mirrors
2661 ADD CONSTRAINT idx_2198115_primary
PRIMARY KEY (id);
2665 -- Name: idx_2198126_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2668 ALTER TABLE ONLY mirrors_history
2669 ADD CONSTRAINT idx_2198126_primary
PRIMARY KEY (id);
2673 -- Name: idx_2198132_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2676 ALTER TABLE ONLY packages
2677 ADD CONSTRAINT idx_2198132_primary
PRIMARY KEY (id);
2681 -- Name: idx_2198147_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2684 ALTER TABLE ONLY packages_properties
2685 ADD CONSTRAINT idx_2198147_primary
PRIMARY KEY (id);
2689 -- Name: idx_2198155_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2692 ALTER TABLE ONLY queue_delete
2693 ADD CONSTRAINT idx_2198155_primary
PRIMARY KEY (id);
2697 -- Name: idx_2198164_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2700 ALTER TABLE ONLY repositories
2701 ADD CONSTRAINT idx_2198164_primary
PRIMARY KEY (id);
2705 -- Name: idx_2198179_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2708 ALTER TABLE ONLY repositories_aux
2709 ADD CONSTRAINT idx_2198179_primary
PRIMARY KEY (id);
2713 -- Name: idx_2198189_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2716 ALTER TABLE ONLY repositories_builds
2717 ADD CONSTRAINT idx_2198189_primary
PRIMARY KEY (id);
2721 -- Name: idx_2198207_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2724 ALTER TABLE ONLY slogans
2725 ADD CONSTRAINT idx_2198207_primary
PRIMARY KEY (id);
2729 -- Name: idx_2198213_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2732 ALTER TABLE ONLY sources
2733 ADD CONSTRAINT idx_2198213_primary
PRIMARY KEY (id);
2737 -- Name: idx_2198222_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2740 ALTER TABLE ONLY sources_commits
2741 ADD CONSTRAINT idx_2198222_primary
PRIMARY KEY (id);
2745 -- Name: idx_2198232_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2748 ALTER TABLE ONLY uploads
2749 ADD CONSTRAINT idx_2198232_primary
PRIMARY KEY (id);
2753 -- Name: idx_2198244_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2756 ALTER TABLE ONLY users
2757 ADD CONSTRAINT idx_2198244_primary
PRIMARY KEY (id);
2761 -- Name: idx_2198256_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2764 ALTER TABLE ONLY users_emails
2765 ADD CONSTRAINT idx_2198256_primary
PRIMARY KEY (id);
2769 -- Name: idx_2198263_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2772 ALTER TABLE ONLY users_permissions
2773 ADD CONSTRAINT idx_2198263_primary
PRIMARY KEY (id);
2777 -- Name: idx_2198274_primary; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2780 ALTER TABLE ONLY user_messages
2781 ADD CONSTRAINT idx_2198274_primary
PRIMARY KEY (id);
2785 -- Name: jobs_packages_unique; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2788 ALTER TABLE ONLY jobs_packages
2789 ADD CONSTRAINT jobs_packages_unique
UNIQUE (job_id
, pkg_id
);
2793 -- Name: mirrors_checks_pkey; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2796 ALTER TABLE ONLY mirrors_checks
2797 ADD CONSTRAINT mirrors_checks_pkey
PRIMARY KEY (id);
2801 -- Name: sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2804 ALTER TABLE ONLY sessions
2805 ADD CONSTRAINT sessions_pkey
PRIMARY KEY (id);
2809 -- Name: sessions_session_id_key; Type: CONSTRAINT; Schema: public; Owner: pakfire; Tablespace:
2812 ALTER TABLE ONLY sessions
2813 ADD CONSTRAINT sessions_session_id_key
UNIQUE (session_id
);
2817 -- Name: builds_watchers_build_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2820 CREATE INDEX builds_watchers_build_id
ON builds_watchers
USING btree (build_id
);
2824 -- Name: filelists_name; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2827 CREATE INDEX filelists_name
ON filelists
USING btree (name);
2831 -- Name: idx_2197949_host_arch; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2834 CREATE INDEX idx_2197949_host_arch
ON arches_compat
USING btree (host_arch
);
2838 -- Name: idx_2197982_builder_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2841 CREATE INDEX idx_2197982_builder_id
ON builders_history
USING btree (builder_id
);
2845 -- Name: idx_2197988_pkg_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2848 CREATE INDEX idx_2197988_pkg_id
ON builds
USING btree (pkg_id
);
2852 -- Name: idx_2197988_state; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2855 CREATE INDEX idx_2197988_state
ON builds
USING btree (state);
2859 -- Name: idx_2197988_type; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2862 CREATE INDEX idx_2197988_type
ON builds
USING btree (type);
2866 -- Name: idx_2197988_uuid; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2869 CREATE UNIQUE INDEX idx_2197988_uuid
ON builds
USING btree (uuid
);
2873 -- Name: idx_2198002_build_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2876 CREATE UNIQUE INDEX idx_2198002_build_id
ON builds_bugs
USING btree (build_id
, bug_id
);
2880 -- Name: idx_2198018_build_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2883 CREATE INDEX idx_2198018_build_id
ON builds_comments
USING btree (build_id
);
2887 -- Name: idx_2198018_user_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2890 CREATE INDEX idx_2198018_user_id
ON builds_comments
USING btree (user_id
);
2894 -- Name: idx_2198052_pkg_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2897 CREATE INDEX idx_2198052_pkg_id
ON filelists
USING btree (pkg_id
);
2901 -- Name: idx_2198063_build_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2904 CREATE INDEX idx_2198063_build_id
ON jobs
USING btree (build_id
);
2908 -- Name: idx_2198063_state; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2911 CREATE INDEX idx_2198063_state
ON jobs
USING btree (state);
2915 -- Name: idx_2198063_time_finished; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2918 CREATE INDEX idx_2198063_time_finished
ON jobs
USING btree (time_finished
);
2922 -- Name: idx_2198063_type; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2925 CREATE INDEX idx_2198063_type
ON jobs
USING btree (type);
2929 -- Name: idx_2198063_uuid; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2932 CREATE UNIQUE INDEX idx_2198063_uuid
ON jobs
USING btree (uuid
);
2936 -- Name: idx_2198074_job_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2939 CREATE INDEX idx_2198074_job_id
ON jobs_buildroots
USING btree (job_id
);
2943 -- Name: idx_2198080_job_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2946 CREATE INDEX idx_2198080_job_id
ON jobs_history
USING btree (job_id
);
2950 -- Name: idx_2198089_job_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2953 CREATE UNIQUE INDEX idx_2198089_job_id
ON jobs_repos
USING btree (job_id
, repo_id
);
2957 -- Name: idx_2198094_fingerprint; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2960 CREATE UNIQUE INDEX idx_2198094_fingerprint
ON keys
USING btree (fingerprint
);
2964 -- Name: idx_2198132_epoch; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2967 CREATE INDEX idx_2198132_epoch
ON packages
USING btree (epoch
);
2971 -- Name: idx_2198132_name; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2974 CREATE INDEX idx_2198132_name
ON packages
USING btree (name);
2978 -- Name: idx_2198132_release; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2981 CREATE INDEX idx_2198132_release
ON packages
USING btree (release);
2985 -- Name: idx_2198132_type; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2988 CREATE INDEX idx_2198132_type
ON packages
USING btree (type);
2992 -- Name: idx_2198132_uuid; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
2995 CREATE INDEX idx_2198132_uuid
ON packages
USING btree (uuid
);
2999 -- Name: idx_2198132_version; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3002 CREATE INDEX idx_2198132_version
ON packages
USING btree (version);
3006 -- Name: idx_2198139_pkg_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3009 CREATE INDEX idx_2198139_pkg_id
ON packages_deps
USING btree (pkg_id
);
3013 -- Name: idx_2198147_name; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3016 CREATE UNIQUE INDEX idx_2198147_name
ON packages_properties
USING btree (name);
3020 -- Name: idx_2198189_build_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3023 CREATE UNIQUE INDEX idx_2198189_build_id
ON repositories_builds
USING btree (build_id
);
3027 -- Name: idx_2198193_build_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3030 CREATE INDEX idx_2198193_build_id
ON repositories_history
USING btree (build_id
);
3034 -- Name: idx_2198199_k; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3037 CREATE UNIQUE INDEX idx_2198199_k
ON settings
USING btree (k
);
3041 -- Name: idx_2198213_identifier; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3044 CREATE UNIQUE INDEX idx_2198213_identifier
ON sources
USING btree (identifier
);
3048 -- Name: idx_2198222_revision; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3051 CREATE INDEX idx_2198222_revision
ON sources_commits
USING btree (revision
);
3055 -- Name: idx_2198232_uuid; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3058 CREATE UNIQUE INDEX idx_2198232_uuid
ON uploads
USING btree (uuid
);
3062 -- Name: idx_2198244_name; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3065 CREATE UNIQUE INDEX idx_2198244_name
ON users
USING btree (name);
3069 -- Name: idx_2198256_email; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3072 CREATE UNIQUE INDEX idx_2198256_email
ON users_emails
USING btree (email
);
3076 -- Name: idx_2198256_user_id; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3079 CREATE INDEX idx_2198256_user_id
ON users_emails
USING btree (user_id
);
3083 -- Name: jobs_arch; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3086 CREATE INDEX jobs_arch
ON jobs
USING btree (arch
);
3090 -- Name: jobs_buildroots_pkg_uuid; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3093 CREATE INDEX jobs_buildroots_pkg_uuid
ON jobs_buildroots
USING btree (pkg_uuid
);
3097 -- Name: mirrors_checks_sort; Type: INDEX; Schema: public; Owner: pakfire; Tablespace:
3100 CREATE INDEX mirrors_checks_sort
ON mirrors_checks
USING btree (mirror_id
, "timestamp");
3102 ALTER TABLE mirrors_checks
CLUSTER ON mirrors_checks_sort
;
3106 -- Name: on_update_current_timestamp; Type: TRIGGER; Schema: public; Owner: pakfire
3109 CREATE TRIGGER on_update_current_timestamp
BEFORE UPDATE ON sources
FOR EACH ROW EXECUTE PROCEDURE on_update_current_timestamp_sources();
3113 -- Name: builders_history_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3116 ALTER TABLE ONLY builders_history
3117 ADD CONSTRAINT builders_history_builder_id
FOREIGN KEY (builder_id
) REFERENCES builders(id);
3121 -- Name: builders_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3124 ALTER TABLE ONLY builders_history
3125 ADD CONSTRAINT builders_history_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3129 -- Name: builds_bug_build_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3132 ALTER TABLE ONLY builds_bugs
3133 ADD CONSTRAINT builds_bug_build_id
FOREIGN KEY (build_id
) REFERENCES builds(id);
3137 -- Name: builds_comments_build_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3140 ALTER TABLE ONLY builds_comments
3141 ADD CONSTRAINT builds_comments_build_id
FOREIGN KEY (build_id
) REFERENCES builds(id);
3145 -- Name: builds_comments_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3148 ALTER TABLE ONLY builds_comments
3149 ADD CONSTRAINT builds_comments_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3153 -- Name: builds_depends_on; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3156 ALTER TABLE ONLY builds
3157 ADD CONSTRAINT builds_depends_on
FOREIGN KEY (depends_on
) REFERENCES builds(id);
3161 -- Name: builds_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3164 ALTER TABLE ONLY builds
3165 ADD CONSTRAINT builds_distro_id
FOREIGN KEY (distro_id
) REFERENCES distributions(id);
3169 -- Name: builds_history_build_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3172 ALTER TABLE ONLY builds_history
3173 ADD CONSTRAINT builds_history_build_id
FOREIGN KEY (build_id
) REFERENCES builds(id);
3177 -- Name: builds_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3180 ALTER TABLE ONLY builds_history
3181 ADD CONSTRAINT builds_history_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3185 -- Name: builds_owner_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3188 ALTER TABLE ONLY builds
3189 ADD CONSTRAINT builds_owner_id
FOREIGN KEY (owner_id
) REFERENCES users(id);
3193 -- Name: builds_pkg_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3196 ALTER TABLE ONLY builds
3197 ADD CONSTRAINT builds_pkg_id
FOREIGN KEY (pkg_id
) REFERENCES packages(id);
3201 -- Name: builds_watchers_build_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3204 ALTER TABLE ONLY builds_watchers
3205 ADD CONSTRAINT builds_watchers_build_id
FOREIGN KEY (build_id
) REFERENCES builds(id);
3209 -- Name: builds_watchers_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3212 ALTER TABLE ONLY builds_watchers
3213 ADD CONSTRAINT builds_watchers_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3217 -- Name: distro_arches_arch_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3220 ALTER TABLE ONLY distro_arches
3221 ADD CONSTRAINT distro_arches_arch_id
FOREIGN KEY (arch_id
) REFERENCES arches(id);
3225 -- Name: distro_arches_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3228 ALTER TABLE ONLY distro_arches
3229 ADD CONSTRAINT distro_arches_distro_id
FOREIGN KEY (distro_id
) REFERENCES distributions(id);
3233 -- Name: filelists_pkg_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3236 ALTER TABLE ONLY filelists
3237 ADD CONSTRAINT filelists_pkg_id
FOREIGN KEY (pkg_id
) REFERENCES packages(id);
3241 -- Name: jobs_arch; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3244 ALTER TABLE ONLY jobs
3245 ADD CONSTRAINT jobs_arch
FOREIGN KEY (arch
) REFERENCES arches(name);
3249 -- Name: jobs_build_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3252 ALTER TABLE ONLY jobs
3253 ADD CONSTRAINT jobs_build_id
FOREIGN KEY (build_id
) REFERENCES builds(id);
3257 -- Name: jobs_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3260 ALTER TABLE ONLY jobs
3261 ADD CONSTRAINT jobs_builder_id
FOREIGN KEY (builder_id
) REFERENCES builders(id);
3265 -- Name: jobs_buildroots_job_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3268 ALTER TABLE ONLY jobs_buildroots
3269 ADD CONSTRAINT jobs_buildroots_job_id
FOREIGN KEY (job_id
) REFERENCES jobs(id);
3273 -- Name: jobs_history_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3276 ALTER TABLE ONLY jobs_history
3277 ADD CONSTRAINT jobs_history_builder_id
FOREIGN KEY (builder_id
) REFERENCES builders(id);
3281 -- Name: jobs_history_job_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3284 ALTER TABLE ONLY jobs_history
3285 ADD CONSTRAINT jobs_history_job_id
FOREIGN KEY (job_id
) REFERENCES jobs(id);
3289 -- Name: jobs_history_test_job_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3292 ALTER TABLE ONLY jobs_history
3293 ADD CONSTRAINT jobs_history_test_job_id
FOREIGN KEY (test_job_id
) REFERENCES jobs(id);
3297 -- Name: jobs_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3300 ALTER TABLE ONLY jobs_history
3301 ADD CONSTRAINT jobs_history_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3305 -- Name: jobs_packaged_job_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3308 ALTER TABLE ONLY jobs_packages
3309 ADD CONSTRAINT jobs_packaged_job_id
FOREIGN KEY (job_id
) REFERENCES jobs(id);
3313 -- Name: jobs_packages_pkg_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3316 ALTER TABLE ONLY jobs_packages
3317 ADD CONSTRAINT jobs_packages_pkg_id
FOREIGN KEY (pkg_id
) REFERENCES packages(id);
3321 -- Name: jobs_repos_job_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3324 ALTER TABLE ONLY jobs_repos
3325 ADD CONSTRAINT jobs_repos_job_id
FOREIGN KEY (job_id
) REFERENCES jobs(id);
3329 -- Name: jobs_repos_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3332 ALTER TABLE ONLY jobs_repos
3333 ADD CONSTRAINT jobs_repos_repo_id
FOREIGN KEY (repo_id
) REFERENCES repositories(id);
3337 -- Name: keys_subkeys_key_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3340 ALTER TABLE ONLY keys_subkeys
3341 ADD CONSTRAINT keys_subkeys_key_id
FOREIGN KEY (key_id
) REFERENCES keys(id);
3345 -- Name: logfiles_job_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3348 ALTER TABLE ONLY logfiles
3349 ADD CONSTRAINT logfiles_job_id
FOREIGN KEY (job_id
) REFERENCES jobs(id);
3353 -- Name: mirrors_checks_mirror_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3356 ALTER TABLE ONLY mirrors_checks
3357 ADD CONSTRAINT mirrors_checks_mirror_id
FOREIGN KEY (mirror_id
) REFERENCES mirrors(id);
3361 -- Name: mirrors_history_mirror_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3364 ALTER TABLE ONLY mirrors_history
3365 ADD CONSTRAINT mirrors_history_mirror_id
FOREIGN KEY (mirror_id
) REFERENCES mirrors(id);
3369 -- Name: mirrors_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3372 ALTER TABLE ONLY mirrors_history
3373 ADD CONSTRAINT mirrors_history_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3377 -- Name: packages_arch; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3380 ALTER TABLE ONLY packages
3381 ADD CONSTRAINT packages_arch
FOREIGN KEY (arch
) REFERENCES arches(id);
3385 -- Name: packages_commit_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3388 ALTER TABLE ONLY packages
3389 ADD CONSTRAINT packages_commit_id
FOREIGN KEY (commit_id
) REFERENCES sources_commits(id);
3393 -- Name: packages_deps_pkg_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3396 ALTER TABLE ONLY packages_deps
3397 ADD CONSTRAINT packages_deps_pkg_id
FOREIGN KEY (pkg_id
) REFERENCES packages(id);
3401 -- Name: repositories_aux_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3404 ALTER TABLE ONLY repositories_aux
3405 ADD CONSTRAINT repositories_aux_distro_id
FOREIGN KEY (distro_id
) REFERENCES distributions(id);
3409 -- Name: repositories_builds_build_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3412 ALTER TABLE ONLY repositories_builds
3413 ADD CONSTRAINT repositories_builds_build_id
FOREIGN KEY (build_id
) REFERENCES builds(id);
3417 -- Name: repositories_builds_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3420 ALTER TABLE ONLY repositories_builds
3421 ADD CONSTRAINT repositories_builds_repo_id
FOREIGN KEY (repo_id
) REFERENCES repositories(id);
3425 -- Name: repositories_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3428 ALTER TABLE ONLY repositories
3429 ADD CONSTRAINT repositories_distro_id
FOREIGN KEY (distro_id
) REFERENCES distributions(id);
3433 -- Name: repositories_history_build_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3436 ALTER TABLE ONLY repositories_history
3437 ADD CONSTRAINT repositories_history_build_id
FOREIGN KEY (build_id
) REFERENCES builds(id);
3441 -- Name: repositories_history_from_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3444 ALTER TABLE ONLY repositories_history
3445 ADD CONSTRAINT repositories_history_from_repo_id
FOREIGN KEY (from_repo_id
) REFERENCES repositories(id);
3449 -- Name: repositories_history_to_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3452 ALTER TABLE ONLY repositories_history
3453 ADD CONSTRAINT repositories_history_to_repo_id
FOREIGN KEY (to_repo_id
) REFERENCES repositories(id);
3457 -- Name: repositories_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3460 ALTER TABLE ONLY repositories_history
3461 ADD CONSTRAINT repositories_history_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3465 -- Name: repositories_key_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3468 ALTER TABLE ONLY repositories
3469 ADD CONSTRAINT repositories_key_id
FOREIGN KEY (key_id
) REFERENCES keys(id);
3473 -- Name: repositories_parent_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3476 ALTER TABLE ONLY repositories
3477 ADD CONSTRAINT repositories_parent_id
FOREIGN KEY (parent_id
) REFERENCES repositories(id);
3481 -- Name: sessions_impersonated_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3484 ALTER TABLE ONLY sessions
3485 ADD CONSTRAINT sessions_impersonated_user_id
FOREIGN KEY (impersonated_user_id
) REFERENCES users(id);
3489 -- Name: sessions_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3492 ALTER TABLE ONLY sessions
3493 ADD CONSTRAINT sessions_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3497 -- Name: sources_commits_source_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3500 ALTER TABLE ONLY sources_commits
3501 ADD CONSTRAINT sources_commits_source_id
FOREIGN KEY (source_id
) REFERENCES sources(id);
3505 -- Name: sources_distro_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3508 ALTER TABLE ONLY sources
3509 ADD CONSTRAINT sources_distro_id
FOREIGN KEY (distro_id
) REFERENCES distributions(id);
3513 -- Name: uploads_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3516 ALTER TABLE ONLY uploads
3517 ADD CONSTRAINT uploads_builder_id
FOREIGN KEY (builder_id
) REFERENCES builders(id);
3521 -- Name: uploads_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3524 ALTER TABLE ONLY uploads
3525 ADD CONSTRAINT uploads_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3529 -- Name: users_emails_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3532 ALTER TABLE ONLY users_emails
3533 ADD CONSTRAINT users_emails_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3537 -- Name: users_permissions_user_id; Type: FK CONSTRAINT; Schema: public; Owner: pakfire
3540 ALTER TABLE ONLY users_permissions
3541 ADD CONSTRAINT users_permissions_user_id
FOREIGN KEY (user_id
) REFERENCES users(id);
3545 -- PostgreSQL database dump complete