schema/spacewalk/common/tables/rhnPackage.sql | 86 ------------------------
schema/spacewalk/oracle/tables/rhnPackage.sql | 86 ++++++++++++++++++++++++
schema/spacewalk/postgres/tables/rhnPackage.sql | 80 ++++++++++++++++++++++
3 files changed, 166 insertions(+), 86 deletions(-)
New commits:
commit 8f3746c62e23f17298f1f36158f1b5ee069513d1
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Dec 22 16:22:43 2010 +0100
We need the build_time column without time zone.
Addressing
Error: Package with same name already exists on server but contents differ (differing
build times or hosts). Use --force or remove old package before uploading the newer
version.
Diff: [['build_time', '2010-06-23 23:06:12', '2010-06-23
23:06:12-04:00']]
diff --git a/schema/spacewalk/postgres/tables/rhnPackage.sql
b/schema/spacewalk/postgres/tables/rhnPackage.sql
index 02506e0..6b01e06 100644
--- a/schema/spacewalk/postgres/tables/rhnPackage.sql
+++ b/schema/spacewalk/postgres/tables/rhnPackage.sql
@@ -40,7 +40,7 @@ CREATE TABLE rhnPackage
package_size NUMERIC NOT NULL,
payload_size NUMERIC,
build_host VARCHAR(256),
- build_time TIMESTAMPTZ,
+ build_time TIMESTAMP WITHOUT TIME ZONE,
source_rpm_id NUMERIC
CONSTRAINT rhn_package_srcrpmid_fk
REFERENCES rhnSourceRPM (id),
commit f11467d8f4a2bbdedde0adc505e73168e22d5ed3
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Wed Dec 22 16:21:57 2010 +0100
Do a separate PostgreSQL version of the rhnPackage table.
diff --git a/schema/spacewalk/common/tables/rhnPackage.sql
b/schema/spacewalk/common/tables/rhnPackage.sql
deleted file mode 100644
index b0cefdd..0000000
--- a/schema/spacewalk/common/tables/rhnPackage.sql
+++ /dev/null
@@ -1,86 +0,0 @@
---
--- Copyright (c) 2008--2010 Red Hat, Inc.
---
--- This software is licensed to you under the GNU General Public License,
--- version 2 (GPLv2). There is NO WARRANTY for this software, express or
--- implied, including the implied warranties of MERCHANTABILITY or FITNESS
--- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
--- along with this software; if not, see
---
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
---
--- Red Hat trademarks are not licensed under GPLv2. No permission is
--- granted to use or replicate Red Hat trademarks that are incorporated
--- in this software or its documentation.
---
-
-
-CREATE TABLE rhnPackage
-(
- id NUMBER NOT NULL
- CONSTRAINT rhn_package_id_pk PRIMARY KEY
- USING INDEX TABLESPACE [[4m_tbs]],
- org_id NUMBER
- CONSTRAINT rhn_package_oid_fk
- REFERENCES web_customer (id)
- ON DELETE CASCADE,
- name_id NUMBER NOT NULL
- CONSTRAINT rhn_package_nid_fk
- REFERENCES rhnPackageName (id),
- evr_id NUMBER NOT NULL
- CONSTRAINT rhn_package_eid_fk
- REFERENCES rhnPackageEvr (id),
- package_arch_id NUMBER NOT NULL
- CONSTRAINT rhn_package_paid_fk
- REFERENCES rhnPackageArch (id),
- package_group NUMBER
- CONSTRAINT rhn_package_group_fk
- REFERENCES rhnPackageGroup (id),
- rpm_version VARCHAR2(16),
- description VARCHAR2(4000),
- summary VARCHAR2(4000),
- package_size NUMBER NOT NULL,
- payload_size NUMBER,
- build_host VARCHAR2(256),
- build_time DATE,
- source_rpm_id NUMBER
- CONSTRAINT rhn_package_srcrpmid_fk
- REFERENCES rhnSourceRPM (id),
- checksum_id NUMBER NOT NULL
- CONSTRAINT rhn_package_chsum_fk
- REFERENCES rhnChecksum (id),
- vendor VARCHAR2(64) NOT NULL,
- payload_format VARCHAR2(32),
- compat NUMBER(1)
- DEFAULT (0)
- CONSTRAINT rhn_package_compat_check
- CHECK (compat in ( 1 , 0 )),
- path VARCHAR2(1000),
- header_sig VARCHAR2(64),
- copyright VARCHAR2(128),
- cookie VARCHAR2(128),
- last_modified DATE
- DEFAULT (sysdate) NOT NULL,
- created DATE
- DEFAULT (sysdate) NOT NULL,
- modified DATE
- DEFAULT (sysdate) NOT NULL,
- header_start NUMBER
- DEFAULT (-1) NOT NULL,
- header_end NUMBER
- DEFAULT (-1) NOT NULL
-)
-ENABLE ROW MOVEMENT
-;
-
-CREATE INDEX rhn_package_oid_id_idx
- ON rhnPackage (org_id, id)
- TABLESPACE [[64k_tbs]]
- NOLOGGING;
-
-CREATE INDEX rhn_package_nid_id_idx
- ON rhnPackage (name_id, id)
- TABLESPACE [[2m_tbs]]
- NOLOGGING;
-
-CREATE SEQUENCE rhn_package_id_seq;
-
diff --git a/schema/spacewalk/oracle/tables/rhnPackage.sql
b/schema/spacewalk/oracle/tables/rhnPackage.sql
new file mode 100644
index 0000000..b0cefdd
--- /dev/null
+++ b/schema/spacewalk/oracle/tables/rhnPackage.sql
@@ -0,0 +1,86 @@
+--
+-- Copyright (c) 2008--2010 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+
+CREATE TABLE rhnPackage
+(
+ id NUMBER NOT NULL
+ CONSTRAINT rhn_package_id_pk PRIMARY KEY
+ USING INDEX TABLESPACE [[4m_tbs]],
+ org_id NUMBER
+ CONSTRAINT rhn_package_oid_fk
+ REFERENCES web_customer (id)
+ ON DELETE CASCADE,
+ name_id NUMBER NOT NULL
+ CONSTRAINT rhn_package_nid_fk
+ REFERENCES rhnPackageName (id),
+ evr_id NUMBER NOT NULL
+ CONSTRAINT rhn_package_eid_fk
+ REFERENCES rhnPackageEvr (id),
+ package_arch_id NUMBER NOT NULL
+ CONSTRAINT rhn_package_paid_fk
+ REFERENCES rhnPackageArch (id),
+ package_group NUMBER
+ CONSTRAINT rhn_package_group_fk
+ REFERENCES rhnPackageGroup (id),
+ rpm_version VARCHAR2(16),
+ description VARCHAR2(4000),
+ summary VARCHAR2(4000),
+ package_size NUMBER NOT NULL,
+ payload_size NUMBER,
+ build_host VARCHAR2(256),
+ build_time DATE,
+ source_rpm_id NUMBER
+ CONSTRAINT rhn_package_srcrpmid_fk
+ REFERENCES rhnSourceRPM (id),
+ checksum_id NUMBER NOT NULL
+ CONSTRAINT rhn_package_chsum_fk
+ REFERENCES rhnChecksum (id),
+ vendor VARCHAR2(64) NOT NULL,
+ payload_format VARCHAR2(32),
+ compat NUMBER(1)
+ DEFAULT (0)
+ CONSTRAINT rhn_package_compat_check
+ CHECK (compat in ( 1 , 0 )),
+ path VARCHAR2(1000),
+ header_sig VARCHAR2(64),
+ copyright VARCHAR2(128),
+ cookie VARCHAR2(128),
+ last_modified DATE
+ DEFAULT (sysdate) NOT NULL,
+ created DATE
+ DEFAULT (sysdate) NOT NULL,
+ modified DATE
+ DEFAULT (sysdate) NOT NULL,
+ header_start NUMBER
+ DEFAULT (-1) NOT NULL,
+ header_end NUMBER
+ DEFAULT (-1) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE INDEX rhn_package_oid_id_idx
+ ON rhnPackage (org_id, id)
+ TABLESPACE [[64k_tbs]]
+ NOLOGGING;
+
+CREATE INDEX rhn_package_nid_id_idx
+ ON rhnPackage (name_id, id)
+ TABLESPACE [[2m_tbs]]
+ NOLOGGING;
+
+CREATE SEQUENCE rhn_package_id_seq;
+
diff --git a/schema/spacewalk/postgres/tables/rhnPackage.sql
b/schema/spacewalk/postgres/tables/rhnPackage.sql
new file mode 100644
index 0000000..02506e0
--- /dev/null
+++ b/schema/spacewalk/postgres/tables/rhnPackage.sql
@@ -0,0 +1,80 @@
+-- oracle equivalent source sha1 197aca2e6b8be7fa9aef2f9dfe3052e622cc4d22
+--
+-- Copyright (c) 2008--2010 Red Hat, Inc.
+--
+-- This software is licensed to you under the GNU General Public License,
+-- version 2 (GPLv2). There is NO WARRANTY for this software, express or
+-- implied, including the implied warranties of MERCHANTABILITY or FITNESS
+-- FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+-- along with this software; if not, see
+--
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+--
+-- Red Hat trademarks are not licensed under GPLv2. No permission is
+-- granted to use or replicate Red Hat trademarks that are incorporated
+-- in this software or its documentation.
+--
+
+CREATE TABLE rhnPackage
+(
+ id NUMERIC
+ CONSTRAINT rhn_package_id_pk PRIMARY KEY,
+ org_id NUMERIC
+ CONSTRAINT rhn_package_oid_fk
+ REFERENCES web_customer (id)
+ ON DELETE CASCADE,
+ name_id NUMERIC NOT NULL
+ CONSTRAINT rhn_package_nid_fk
+ REFERENCES rhnPackageName (id),
+ evr_id NUMERIC NOT NULL
+ CONSTRAINT rhn_package_eid_fk
+ REFERENCES rhnPackageEvr (id),
+ package_arch_id NUMERIC NOT NULL
+ CONSTRAINT rhn_package_paid_fk
+ REFERENCES rhnPackageArch (id),
+ package_group NUMERIC
+ CONSTRAINT rhn_package_group_fk
+ REFERENCES rhnPackageGroup (id),
+ rpm_version VARCHAR(16),
+ description VARCHAR(4000),
+ summary VARCHAR(4000),
+ package_size NUMERIC NOT NULL,
+ payload_size NUMERIC,
+ build_host VARCHAR(256),
+ build_time TIMESTAMPTZ,
+ source_rpm_id NUMERIC
+ CONSTRAINT rhn_package_srcrpmid_fk
+ REFERENCES rhnSourceRPM (id),
+ checksum_id NUMERIC NOT NULL
+ CONSTRAINT rhn_package_chsum_fk
+ REFERENCES rhnChecksum (id),
+ vendor VARCHAR(64) NOT NULL,
+ payload_format VARCHAR(32),
+ compat SMALLINT
+ DEFAULT (0)
+ CONSTRAINT rhn_package_compat_check
+ CHECK (compat in ( 1 , 0 )),
+ path VARCHAR(1000),
+ header_sig VARCHAR(64),
+ copyright VARCHAR(128),
+ cookie VARCHAR(128),
+ last_modified TIMESTAMPTZ
+ DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
+ created TIMESTAMPTZ
+ DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
+ modified TIMESTAMPTZ
+ DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
+ header_start NUMERIC
+ DEFAULT (-1) NOT NULL,
+ header_end NUMERIC
+ DEFAULT (-1) NOT NULL
+)
+;
+
+CREATE INDEX rhn_package_oid_id_idx
+ ON rhnPackage (org_id, id);
+
+CREATE INDEX rhn_package_nid_id_idx
+ ON rhnPackage (name_id, id);
+
+CREATE SEQUENCE rhn_package_id_seq;
+