schema/spacewalk

Milan Zazrivec mzazrive at fedoraproject.org
Fri Jun 15 11:50:49 UTC 2012


 schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql            |   36 ----------
 schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.oracle     |   36 ++++++++++
 schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.postgresql |   35 +++++++++
 3 files changed, 71 insertions(+), 36 deletions(-)

New commits:
commit b95346fea2cbaacad54efe2289a1d7668bb3f63d
Author: Milan Zazrivec <mzazrivec at redhat.com>
Date:   Fri Jun 15 13:49:50 2012 +0200

    separate schema upgrade script for PostgreSQL
    
    This is to avoid upgrade errors like:
    
    psql:/var/log/spacewalk/schema-upgrade/20120615-005306-script.sql:1551: ERROR:  syntax error at or near "ENABLE"
    LINE 18: ENABLE ROW MOVEMENT

diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql
deleted file mode 100644
index 9cad567..0000000
--- a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql
+++ /dev/null
@@ -1,36 +0,0 @@
---
--- Copyright (c) 2012 Novell
---
--- 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 suseCredentials
-(
-    id       NUMBER NOT NULL
-                 CONSTRAINT suse_credentials_pk PRIMARY KEY,
-    user_id  NUMBER NOT NULL
-                 CONSTRAINT suse_credentials_user_fk
-                 REFERENCES web_contact (id)
-                 ON DELETE CASCADE,
-    type_id  NUMBER NOT NULL
-                 CONSTRAINT suse_credentials_type_fk
-                 REFERENCES suseCredentialsType (id),
-    url      VARCHAR2(256),
-    username VARCHAR2(64) NOT NULL,
-    password VARCHAR2(64) NOT NULL,
-    created  DATE DEFAULT (sysdate) NOT NULL,
-    modified DATE DEFAULT (sysdate) NOT NULL
-)
-ENABLE ROW MOVEMENT
-;
-
-CREATE SEQUENCE suse_credentials_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.oracle b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.oracle
new file mode 100644
index 0000000..9cad567
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.oracle
@@ -0,0 +1,36 @@
+--
+-- Copyright (c) 2012 Novell
+--
+-- 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 suseCredentials
+(
+    id       NUMBER NOT NULL
+                 CONSTRAINT suse_credentials_pk PRIMARY KEY,
+    user_id  NUMBER NOT NULL
+                 CONSTRAINT suse_credentials_user_fk
+                 REFERENCES web_contact (id)
+                 ON DELETE CASCADE,
+    type_id  NUMBER NOT NULL
+                 CONSTRAINT suse_credentials_type_fk
+                 REFERENCES suseCredentialsType (id),
+    url      VARCHAR2(256),
+    username VARCHAR2(64) NOT NULL,
+    password VARCHAR2(64) NOT NULL,
+    created  DATE DEFAULT (sysdate) NOT NULL,
+    modified DATE DEFAULT (sysdate) NOT NULL
+)
+ENABLE ROW MOVEMENT
+;
+
+CREATE SEQUENCE suse_credentials_id_seq;
diff --git a/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.postgresql b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.postgresql
new file mode 100644
index 0000000..4845d15
--- /dev/null
+++ b/schema/spacewalk/upgrade/spacewalk-schema-1.7-to-spacewalk-schema-1.8/104-suseCredentials_create.sql.postgresql
@@ -0,0 +1,35 @@
+-- oracle equivalent source sha1 be0097f70c2d4700e7533fdcc543dcbd3c3a181f
+-- Copyright (c) 2012 Novell
+--
+-- 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 suseCredentials
+(
+    id       NUMBER NOT NULL
+                 CONSTRAINT suse_credentials_pk PRIMARY KEY,
+    user_id  NUMBER NOT NULL
+                 CONSTRAINT suse_credentials_user_fk
+                 REFERENCES web_contact (id)
+                 ON DELETE CASCADE,
+    type_id  NUMBER NOT NULL
+                 CONSTRAINT suse_credentials_type_fk
+                 REFERENCES suseCredentialsType (id),
+    url      VARCHAR2(256),
+    username VARCHAR2(64) NOT NULL,
+    password VARCHAR2(64) NOT NULL,
+    created  DATE DEFAULT (sysdate) NOT NULL,
+    modified DATE DEFAULT (sysdate) NOT NULL
+)
+;
+
+CREATE SEQUENCE suse_credentials_id_seq;




More information about the spacewalk-commits mailing list