From 826b974bf31b7dd57c21fdff72eb3b9ad2ce71bd Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 8 Aug 2015 04:49:03 +0100 Subject: Fixes from first run with packages in a second repo --- gentoobrowse/console/packageimport.xml | 3 +-- gentoobrowse/datasources/schema.sql | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gentoobrowse/console/packageimport.xml b/gentoobrowse/console/packageimport.xml index 04375ca..0c1d7df 100644 --- a/gentoobrowse/console/packageimport.xml +++ b/gentoobrowse/console/packageimport.xml @@ -62,9 +62,8 @@ FROM files f, categories c WHERE filetypeid = 4 AND f.pathparts[1] = c.name) x) x - ) m ON m.categoryid = d.categoryid AND m.pkgname = d.pkgname + ) m ON m.categoryid = d.categoryid AND m.pkgname = d.pkgname AND m.r = 1 WHERE d.r = 1 - AND m.r = 1 diff --git a/gentoobrowse/datasources/schema.sql b/gentoobrowse/datasources/schema.sql index 1f1478f..36877a4 100644 --- a/gentoobrowse/datasources/schema.sql +++ b/gentoobrowse/datasources/schema.sql @@ -602,10 +602,10 @@ ALTER TABLE ONLY users -- Name: repos_pkey; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace: ALTER TABLE ONLY repos ADD CONSTRAINT repos_pkey PRIMARY KEY (repoid); --- Name: uni_ebuild_pkgver; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace: +-- Name: uni_ebuild_pkgverrepo; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace: ALTER TABLE ONLY ebuilds - ADD CONSTRAINT uni_ebuild_pkgver UNIQUE (packageid, version); -ALTER TABLE ebuilds CLUSTER ON uni_ebuild_pkgver; + ADD CONSTRAINT uni_ebuild_pkgverrepo UNIQUE (packageid, version, repoid); +ALTER TABLE ebuilds CLUSTER ON uni_ebuild_pkgverrepo; -- Name: uni_files_filename; Type: CONSTRAINT; Schema: gentoobrowse; Owner: gentoo; Tablespace: ALTER TABLE ONLY files ADD CONSTRAINT uni_files_filename UNIQUE (filename); -- cgit v1.2.3