2 -- SourceForge: Breaking Down the Barriers to Open Source Development
3 -- Copyright 1999-2001 (c) VA Linux Systems
4 -- http://sourceforge.net
7 CREATE TABLE "stats_site" (
12 "total_users" integer,
14 "new_projects" integer
16 CREATE UNIQUE INDEX "statssite_month_day" on "stats_site" using btree ( "month" "int4_ops", "day" "int4_ops" );
19 CREATE TABLE "stats_project" (
20 "month" integer DEFAULT 0 NOT NULL,
21 "day" integer DEFAULT 0 NOT NULL,
22 "group_id" integer DEFAULT 0 NOT NULL,
23 "file_releases" integer DEFAULT 0,
24 "msg_posted" integer DEFAULT 0,
25 "msg_uniq_auth" integer DEFAULT 0,
26 "bugs_opened" integer DEFAULT 0,
27 "bugs_closed" integer DEFAULT 0,
28 "support_opened" integer DEFAULT 0,
29 "support_closed" integer DEFAULT 0,
30 "patches_opened" integer DEFAULT 0,
31 "patches_closed" integer DEFAULT 0,
32 "artifacts_opened" integer DEFAULT 0,
33 "artifacts_closed" integer DEFAULT 0,
34 "tasks_opened" integer DEFAULT 0,
35 "tasks_closed" integer DEFAULT 0,
36 "help_requests" integer DEFAULT 0
38 CREATE UNIQUE INDEX "statsproject_month_day_group" on "stats_project"
39 using btree ( "month" "int4_ops", "day" "int4_ops", "group_id" "int4_ops" );
42 CREATE TABLE "stats_project_developers" (
43 "month" integer DEFAULT 0 NOT NULL,
44 "day" integer DEFAULT 0 NOT NULL,
45 "group_id" integer DEFAULT 0 NOT NULL,
46 "developers" integer DEFAULT 0 NOT NULL
48 CREATE UNIQUE INDEX "statsprojectdev_month_day_group" on "stats_project_developers"
49 using btree ( "month" "int4_ops", "day" "int4_ops", "group_id" "int4_ops" );
52 CREATE TABLE "stats_project_metric" (
53 "month" integer DEFAULT 0 NOT NULL,
54 "day" integer DEFAULT 0 NOT NULL,
55 "ranking" integer DEFAULT 0 NOT NULL,
56 "percentile" double precision DEFAULT 0 NOT NULL,
57 "group_id" integer DEFAULT 0 NOT NULL
59 CREATE UNIQUE INDEX "statsprojectmetric_month_day_gr" on "stats_project_metric"
60 using btree ( "month" "int4_ops", "day" "int4_ops", "group_id" "int4_ops" );
63 CREATE TABLE "frs_dlstats_file_agg" (
69 CREATE UNIQUE INDEX "frsdlfileagg_month_day_file" on "frs_dlstats_file_agg"
70 using btree ( "month" "int4_ops", "day" "int4_ops", "file_id" "int4_ops" );
73 CREATE TABLE "stats_subd_pages" (
74 "month" integer DEFAULT 0 NOT NULL,
75 "day" integer DEFAULT 0 NOT NULL,
76 "group_id" integer DEFAULT 0 NOT NULL,
77 "pages" integer DEFAULT 0 NOT NULL
79 CREATE UNIQUE INDEX "statssubdpages_month_day_group" on "stats_subd_pages"
80 using btree ( "month" "int4_ops", "day" "int4_ops", "group_id" "int4_ops" );
83 CREATE TABLE "stats_agg_logo_by_group" (
89 CREATE UNIQUE INDEX "statslogobygroup_month_day_grou" on "stats_agg_logo_by_group"
90 using btree ( "month" "int4_ops", "day" "int4_ops", "group_id" "int4_ops" );
93 CREATE TABLE "stats_cvs_group" (
94 "month" integer DEFAULT 0 NOT NULL,
95 "day" integer DEFAULT 0 NOT NULL,
96 "group_id" integer DEFAULT 0 NOT NULL,
97 "checkouts" integer DEFAULT 0 NOT NULL,
98 "commits" integer DEFAULT 0 NOT NULL,
99 "adds" integer DEFAULT 0 NOT NULL
101 CREATE UNIQUE INDEX "statscvsgroup_month_day_group" on "stats_cvs_group"
102 using btree ( "month" "int4_ops", "day" "int4_ops", "group_id" "int4_ops" );
105 CREATE TABLE "stats_agg_site_by_group" (
111 CREATE UNIQUE INDEX "statssitebygroup_month_day_grou" on "stats_agg_site_by_group"
112 using btree ( "month" "int4_ops", "day" "int4_ops", "group_id" "int4_ops" );
115 CREATE TABLE "stats_site_pages_by_day" (
118 "site_page_views" integer
120 CREATE INDEX "statssitepagesbyday_month_day" on "stats_site_pages_by_day"
121 using btree ( "month" "int4_ops", "day" "int4_ops" );
124 CREATE TABLE "frs_package" (
125 "package_id" integer DEFAULT nextval('frs_package_pk_seq'::text) NOT NULL,
126 "group_id" integer DEFAULT '0' NOT NULL,
128 "status_id" integer DEFAULT '0' NOT NULL,
129 Constraint "frs_package_pkey" Primary Key ("package_id")
131 CREATE INDEX "package_group_id" on "frs_package" using btree ( "group_id" "int4_ops" );
134 CREATE TABLE "frs_release" (
135 "release_id" integer DEFAULT nextval('frs_release_pk_seq'::text) NOT NULL,
136 "package_id" integer DEFAULT '0' NOT NULL,
140 "status_id" integer DEFAULT '0' NOT NULL,
141 "preformatted" integer DEFAULT '0' NOT NULL,
142 "release_date" integer DEFAULT '0' NOT NULL,
143 "released_by" integer DEFAULT '0' NOT NULL,
144 Constraint "frs_release_pkey" Primary Key ("release_id")
146 CREATE INDEX "frs_release_package" on "frs_release" using btree ( "package_id" "int4_ops" );
149 CREATE TABLE "frs_file" (
150 "file_id" integer DEFAULT nextval('frs_file_pk_seq'::text) NOT NULL,
152 "release_id" integer DEFAULT '0' NOT NULL,
153 "type_id" integer DEFAULT '0' NOT NULL,
154 "processor_id" integer DEFAULT '0' NOT NULL,
155 "release_time" integer DEFAULT '0' NOT NULL,
156 "file_size" integer DEFAULT '0' NOT NULL,
157 "post_date" integer DEFAULT '0' NOT NULL,
158 Constraint "frs_file_pkey" Primary Key ("file_id")
160 CREATE INDEX "frs_file_date" on "frs_file" using btree ( "post_date" "int4_ops" );
161 CREATE INDEX "frs_file_release_id" on "frs_file" using btree ( "release_id" "int4_ops" );
164 CREATE TABLE "users" (
165 "user_id" integer DEFAULT nextval('users_pk_seq'::text) NOT NULL,
166 "user_name" text DEFAULT '' NOT NULL,
167 "email" text DEFAULT '' NOT NULL,
168 "user_pw" character varying(32) DEFAULT '' NOT NULL,
169 "realname" character varying(32) DEFAULT '' NOT NULL,
170 "status" character(1) DEFAULT 'A' NOT NULL,
171 "shell" character varying(20) DEFAULT '/bin/bash' NOT NULL,
172 "unix_pw" character varying(40) DEFAULT '' NOT NULL,
173 "unix_status" character(1) DEFAULT 'N' NOT NULL,
174 "unix_uid" integer DEFAULT '0' NOT NULL,
175 "unix_box" character varying(10) DEFAULT 'shell1' NOT NULL,
176 "add_date" integer DEFAULT '0' NOT NULL,
177 "confirm_hash" character varying(32),
178 "mail_siteupdates" integer DEFAULT '0' NOT NULL,
179 "mail_va" integer DEFAULT '0' NOT NULL,
180 "authorized_keys" text,
182 "people_view_skills" integer DEFAULT '0' NOT NULL,
183 "people_resume" text DEFAULT '' NOT NULL,
184 "timezone" character varying(64) DEFAULT 'GMT',
185 "language" integer DEFAULT '1' NOT NULL,
186 Constraint "users_pkey" Primary Key ("user_id")
188 CREATE UNIQUE INDEX "users_namename_uniq" on "users" using btree ( "user_name" "text_ops" );
189 CREATE INDEX "users_status" on "users" using btree ( "status" "bpchar_ops" );
190 CREATE INDEX "users_user_pw" on "users" using btree ( "user_pw" "varchar_ops" );
193 CREATE TABLE "groups" (
194 "group_id" integer DEFAULT nextval('groups_pk_seq'::text) NOT NULL,
195 "group_name" character varying(40),
196 "homepage" character varying(128),
197 "is_public" integer DEFAULT '0' NOT NULL,
198 "status" character(1) DEFAULT 'A' NOT NULL,
199 "unix_group_name" character varying(30) DEFAULT '' NOT NULL,
200 "unix_box" character varying(20) DEFAULT 'shell1' NOT NULL,
201 "http_domain" character varying(80),
202 "short_description" character varying(255),
203 "cvs_box" character varying(20) DEFAULT 'cvs1' NOT NULL,
204 "license" character varying(16),
205 "register_purpose" text,
206 "license_other" text,
207 "register_time" integer DEFAULT '0' NOT NULL,
208 "dead1" integer DEFAULT '1' NOT NULL,
210 "use_mail" integer DEFAULT '1' NOT NULL,
211 "use_survey" integer DEFAULT '1' NOT NULL,
212 "dead2" integer DEFAULT '1' NOT NULL,
213 "use_forum" integer DEFAULT '1' NOT NULL,
214 "use_pm" integer DEFAULT '1' NOT NULL,
215 "use_cvs" integer DEFAULT '1' NOT NULL,
216 "use_news" integer DEFAULT '1' NOT NULL,
217 "dead3" integer DEFAULT '1' NOT NULL,
218 "dead4" text DEFAULT '' NOT NULL,
219 "dead5" text DEFAULT '' NOT NULL,
220 "dead6" text DEFAULT '' NOT NULL,
221 "type" integer DEFAULT '1' NOT NULL,
222 "use_docman" integer DEFAULT '1' NOT NULL,
223 "dead7" integer DEFAULT '0' NOT NULL,
224 "dead8" integer DEFAULT '0' NOT NULL,
225 "dead9" integer DEFAULT '0' NOT NULL,
226 "new_task_address" text DEFAULT '' NOT NULL,
227 "send_all_tasks" integer DEFAULT '0' NOT NULL,
228 "dead10" integer DEFAULT '1' NOT NULL,
229 "use_pm_depend_box" integer DEFAULT '1' NOT NULL,
233 Constraint "groups_pkey" Primary Key ("group_id")
235 CREATE UNIQUE INDEX "group_unix_uniq" on "groups" using btree ( "unix_group_name" "varchar_ops" );
236 CREATE INDEX "groups_type" on "groups" using btree ( "type" "int4_ops" );
237 CREATE INDEX "groups_public" on "groups" using btree ( "is_public" "int4_ops" );
238 CREATE INDEX "groups_status" on "groups" using btree ( "status" "bpchar_ops" );
241 CREATE TABLE "frs_processor" (
242 "processor_id" integer DEFAULT nextval('frs_processor_pk_seq'::text) NOT NULL,
244 Constraint "frs_processor_pkey" Primary Key ("processor_id")
248 CREATE TABLE "frs_filetype" (
249 "type_id" integer DEFAULT nextval('frs_filetype_pk_seq'::text) NOT NULL,
251 Constraint "frs_filetype_pkey" Primary Key ("type_id")
255 CREATE TABLE "project_weekly_metric" (
256 "ranking" integer DEFAULT nextval('project_weekly_metric_pk_seq'::text) NOT NULL,
257 "percentile" double precision,
258 "group_id" integer DEFAULT '0' NOT NULL,
259 Constraint "project_weekly_metric_pkey" Primary Key ("ranking")
261 CREATE INDEX "projectweeklymetric_ranking" on "project_weekly_metric" using btree ( "ranking" "int4_ops" );
262 CREATE INDEX "project_metric_weekly_group" on "project_weekly_metric" using btree ( "group_id" "int4_ops" );
265 CREATE TABLE "trove_group_link" (
266 "trove_group_id" integer DEFAULT nextval('trove_group_link_pk_seq'::text) NOT NULL,
267 "trove_cat_id" integer DEFAULT '0' NOT NULL,
268 "trove_cat_version" integer DEFAULT '0' NOT NULL,
269 "group_id" integer DEFAULT '0' NOT NULL,
270 "trove_cat_root" integer DEFAULT '0' NOT NULL,
271 Constraint "trove_group_link_pkey" Primary Key ("trove_group_id")
273 CREATE INDEX "trove_group_link_group_id" on "trove_group_link" using btree ( "group_id" "int4_ops" );
274 CREATE INDEX "trove_group_link_cat_id" on "trove_group_link" using btree ( "trove_cat_id" "int4_ops" );
277 CREATE TABLE "trove_cat" (
278 "trove_cat_id" integer DEFAULT nextval('trove_cat_pk_seq'::text) NOT NULL,
279 "version" integer DEFAULT '0' NOT NULL,
280 "parent" integer DEFAULT '0' NOT NULL,
281 "root_parent" integer DEFAULT '0' NOT NULL,
282 "shortname" character varying(80),
283 "fullname" character varying(80),
284 "description" character varying(255),
285 "count_subcat" integer DEFAULT '0' NOT NULL,
286 "count_subproj" integer DEFAULT '0' NOT NULL,
287 "fullpath" text DEFAULT '' NOT NULL,
289 Constraint "trove_cat_pkey" Primary Key ("trove_cat_id")
291 CREATE INDEX "parent_idx" on "trove_cat" using btree ( "parent" "int4_ops" );
292 CREATE INDEX "root_parent_idx" on "trove_cat" using btree ( "root_parent" "int4_ops" );
293 CREATE INDEX "version_idx" on "trove_cat" using btree ( "version" "int4_ops" );
296 CREATE SEQUENCE "trove_treesums_pk_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
297 CREATE TABLE "trove_treesums" (
298 "trove_treesums_id" integer DEFAULT nextval('trove_treesums_pk_seq'::text) NOT NULL,
299 "trove_cat_id" integer DEFAULT '0' NOT NULL,
300 "limit_1" integer DEFAULT '0' NOT NULL,
301 "subprojects" integer DEFAULT '0' NOT NULL,
302 Constraint "trove_treesums_pkey" Primary Key ("trove_treesums_id")
305 CREATE TABLE "foundry_projects" (
306 "id" integer DEFAULT nextval('foundry_projects_pk_seq'::text) NOT NULL,
307 "foundry_id" integer DEFAULT '0' NOT NULL,
308 "project_id" integer DEFAULT '0' NOT NULL,
309 Constraint "foundry_projects_pkey" Primary Key ("id")
311 CREATE INDEX "foundry_projects_foundry" on "foundry_projects" using btree (
312 "foundry_id" "int4_ops" );
314 COPY foundry_projects WITH oids from '/home/tperdue/dumpfiles/foundry_projects.dump';
315 COPY stats_site WITH OIDS FROM '/home/tperdue/dumpfiles/stats_site.dump';
316 COPY stats_project WITH OIDS FROM '/home/tperdue/dumpfiles/stats_project.dump';
317 COPY stats_project_developers WITH OIDS FROM '/home/tperdue/dumpfiles/stats_project_developers.dump';
318 COPY stats_project_metric WITH OIDS FROM '/home/tperdue/dumpfiles/stats_project_metric.dump';
319 COPY frs_dlstats_file_agg WITH OIDS FROM '/home/tperdue/dumpfiles/frs_dlstats_file_agg.dump';
320 COPY stats_subd_pages WITH OIDS FROM '/home/tperdue/dumpfiles/stats_subd_pages.dump';
321 COPY stats_agg_logo_by_group WITH OIDS FROM '/home/tperdue/dumpfiles/stats_agg_logo_by_group.dump';
322 COPY stats_cvs_group WITH OIDS FROM '/home/tperdue/dumpfiles/stats_cvs_group.dump';
323 COPY stats_agg_site_by_group WITH OIDS FROM '/home/tperdue/dumpfiles/stats_agg_site_by_group.dump';
324 COPY stats_site_pages_by_day WITH OIDS FROM '/home/tperdue/dumpfiles/stats_site_pages_by_day.dump';
325 COPY frs_package WITH OIDS FROM '/home/tperdue/dumpfiles/frs_package.dump';
326 COPY frs_release WITH OIDS FROM '/home/tperdue/dumpfiles/frs_release.dump';
327 COPY frs_processor WITH OIDS FROM '/home/tperdue/dumpfiles/frs_processor.dump';
328 COPY frs_filetype WITH OIDS FROM '/home/tperdue/dumpfiles/frs_filetype.dump';
329 COPY frs_file WITH OIDS FROM '/home/tperdue/dumpfiles/frs_file.dump';
330 COPY users WITH OIDS FROM '/home/tperdue/dumpfiles/users.dump';
331 COPY groups WITH OIDS FROM '/home/tperdue/dumpfiles/groups.dump';
332 COPY project_weekly_metric WITH OIDS FROM '/home/tperdue/dumpfiles/project_weekly_metric.dump';
333 COPY trove_cat WITH OIDS FROM '/home/tperdue/dumpfiles/trove_cat.dump';
334 COPY trove_group_link WITH OIDS FROM '/home/tperdue/dumpfiles/trove_group_link.dump';
336 drop index project_weekly_metric_pkey;
338 CREATE UNIQUE INDEX statssite_oid ON stats_site(oid);
339 CREATE UNIQUE INDEX statsproject_oid ON stats_project(oid);
340 CREATE UNIQUE INDEX statsprojectdevelop_oid ON stats_project_developers(oid);
341 CREATE UNIQUE INDEX statsprojectmetric_oid ON stats_project_metric(oid);
342 CREATE UNIQUE INDEX frsdlfileagg_oid ON frs_dlstats_file_agg(oid);
343 CREATE UNIQUE INDEX statssubdpages_oid ON stats_subd_pages(oid);
344 CREATE UNIQUE INDEX statsagglogobygrp_oid ON stats_agg_logo_by_group(oid);
345 CREATE UNIQUE INDEX statscvsgrp_oid ON stats_cvs_group(oid);
346 CREATE UNIQUE INDEX statsaggsitebygrp_oid ON stats_agg_site_by_group(oid);
347 CREATE UNIQUE INDEX statssitepgsbyday_oid ON stats_site_pages_by_day(oid);