jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r558187 - in /jackrabbit/trunk/jackrabbit-core/src/main: java/org/apache/jackrabbit/core/fs/db/ java/org/apache/jackrabbit/core/journal/ java/org/apache/jackrabbit/core/persistence/bundle/ java/org/apache/jackrabbit/core/persistence/db/ res...
Date Fri, 20 Jul 2007 22:44:51 GMT
Author: jukka
Date: Fri Jul 20 15:44:47 2007
New Revision: 558187

URL: http://svn.apache.org/viewvc?view=rev&rev=558187
Log:
JCR-968: Add support for tablespaces to Oracle related classes
    - Applied patch from Martijn Hendriks

Added:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
  (with props)
Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl
    jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/oracle.ddl

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
Fri Jul 20 15:44:47 2007
@@ -58,6 +58,7 @@
  * <li><code>user</code>: the database user</li>
  * <li><code>password</code>: the user's password</li>
  * <li><code>schemaObjectPrefix</code>: prefix to be prepended to schema
objects</li>
+ * <li><code>tableSpace</code>: the tablespace to use</li>
  * </ul>
  * See also {@link DbFileSystem}.
  * <p/>
@@ -68,6 +69,7 @@
  *       &lt;param name="user" value="scott"/&gt;
  *       &lt;param name="password" value="tiger"/&gt;
  *       &lt;param name="schemaObjectPrefix" value="rep_"/&gt;
+ *       &lt;param name="tableSpace" value="default"/&gt;
  *  &lt;/FileSystem&gt;
  * </pre>
  */
@@ -82,6 +84,13 @@
     private Integer DURATION_SESSION_CONSTANT;
     private Integer MODE_READWRITE_CONSTANT;
 
+    /** the variable for the Oracle table space */
+    public static final String TABLE_SPACE_VARIABLE =
+        "${tableSpace}";
+
+    /** the Oracle table space to use */
+    protected String tableSpace;
+
     /**
      * Creates a new <code>OracleFileSystem</code> instance.
      */
@@ -95,6 +104,26 @@
         initialized = false;
     }
 
+    /**
+     * Returns the configured Oracle table space.
+     * @return the configured Oracle table space.
+     */
+    public String getTableSpace() {
+        return tableSpace;
+    }
+
+    /**
+     * Sets the Oracle table space.
+     * @param tableSpace the Oracle table space.
+     */
+    public void setTableSpace(String tableSpace) {
+        if (tableSpace != null) {
+            this.tableSpace = tableSpace.trim();
+        } else {
+            this.tableSpace = null;
+        }
+    }
+
     //-----------------------------------------< DatabaseFileSystem overrides >
     /**
      * {@inheritDoc}
@@ -169,6 +198,16 @@
                     if (!sql.startsWith("#") && sql.length() > 0) {
                         // replace prefix variable
                         sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
+
+                        // set the tablespace if it is defined
+                        String tspace;
+                        if (tableSpace == null || "".equals(tableSpace)) {
+                            tspace = "";
+                        } else {
+                            tspace = "tablespace " + tableSpace;
+                        }
+                        sql = Text.replace(sql, TABLE_SPACE_VARIABLE, tspace).trim();
+
                         // execute sql stmt
                         stmt.executeUpdate(sql);
                     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java
Fri Jul 20 15:44:47 2007
@@ -578,7 +578,7 @@
                     // Skip comments and empty lines
                     if (!sql.startsWith("#") && sql.length() > 0) {
                         // replace prefix variable
-                        sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
+                        sql = createSchemaSQL(sql);
                         // execute sql stmt
                         stmt.executeUpdate(sql);
                     }
@@ -590,6 +590,16 @@
                 close(stmt);
             }
         }
+    }
+
+    /**
+     * Creates an SQL statement for schema creation by variable substitution.
+     *
+     * @param sql a SQL string which may contain variables to substitute
+     * @return a valid SQL string
+     */
+    protected String createSchemaSQL(String sql) {
+        return Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
     }
 
     /**

Added: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java?view=auto&rev=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
(added)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
Fri Jul 20 15:44:47 2007
@@ -0,0 +1,60 @@
+package org.apache.jackrabbit.core.journal;
+
+import org.apache.jackrabbit.util.Text;
+
+
+
+/**
+ * It has the following property in addition to those of the DatabaseJournal:
+ * <ul>
+ * <li><code>tableSpace</code>: the Oracle tablespace to use</li>
+ * </ul>
+ */
+public class OracleDatabaseJournal extends DatabaseJournal {
+
+    /** the variable for the Oracle table space */
+    public static final String TABLE_SPACE_VARIABLE =
+        "${tableSpace}";
+
+    /** the Oracle table space to use */
+    protected String tableSpace;
+
+    /**
+     * Returns the configured Oracle table space.
+     * @return the configured Oracle table space.
+     */
+    public String getTableSpace() {
+        return tableSpace;
+    }
+
+    /**
+     * Sets the Oracle table space.
+     * @param tableSpace the Oracle table space.
+     */
+    public void setTableSpace(String tableSpace) {
+        if (tableSpace != null) {
+            this.tableSpace = tableSpace.trim();
+        } else {
+            this.tableSpace = null;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String createSchemaSQL(String sql) {
+        // replace the schemaObjectPrefix
+        sql = super.createSchemaSQL(sql);
+        // set the tablespace if it is defined
+        String tspace;
+        if (tableSpace == null || "".equals(tableSpace)) {
+            tspace = "";
+        } else {
+            tspace = "tablespace " + tableSpace;
+        }
+        return Text.replace(sql, TABLE_SPACE_VARIABLE, tspace).trim();
+    }
+
+
+
+}

Propchange: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
Fri Jul 20 15:44:47 2007
@@ -411,8 +411,7 @@
             try {
                 String sql = reader.readLine();
                 while (sql != null) {
-                    // replace prefix variable
-                    sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix).trim();
+                    sql = createSchemaSQL(sql);
                     if (sql.length() > 0 && (sql.indexOf("BINVAL") < 0 || useDbBlobStore()))
{
                         // only create blob related tables of db blob store configured
                         // execute sql stmt
@@ -434,6 +433,17 @@
                 stmt.close();
             }
         }
+    }
+
+    /**
+     * Creates an SQL statement for schema creation by variable substitution.
+     *
+     * @param sql a SQL string which may contain variables to substitute
+     * @return a valid SQL string
+     */
+    protected String createSchemaSQL(String sql) {
+        // replace prefix variable
+        return Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix).trim();
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
Fri Jul 20 15:44:47 2007
@@ -22,6 +22,7 @@
 import org.apache.jackrabbit.core.persistence.PMContext;
 import org.apache.jackrabbit.core.persistence.bundle.util.NGKDbNameIndex;
 import org.apache.jackrabbit.core.persistence.bundle.util.DbNameIndex;
+import org.apache.jackrabbit.util.Text;
 
 /**
  * Extends the {@link BundleDbPersistenceManager} by Oracle specific code.
@@ -38,6 +39,7 @@
  * <li>&lt;param name="{@link #setPassword(String) password}" value="crx"/>
  * <li>&lt;param name="{@link #setSchema(String) schema}" value="oracle"/>
  * <li>&lt;param name="{@link #setSchemaObjectPrefix(String) schemaObjectPrefix}"
value="${wsp.name}_"/>
+ * <li>&lt;param name="{@link #setTableSpace(String) tableSpace}" value=""/>
  * <li>&lt;param name="{@link #setErrorHandling(String) errorHandling}" value=""/>
  * </ul>
  */
@@ -46,6 +48,13 @@
     /** the cvs/svn id */
     static final String CVS_ID = "$URL$ $Rev$ $Date$";
 
+    /** the variable for the Oracle table space */
+    public static final String TABLE_SPACE_VARIABLE =
+        "${tableSpace}";
+
+    /** the Oracle table space to use */
+    protected String tableSpace;
+
     /**
      * Creates a new oracle persistence manager
      */
@@ -54,6 +63,26 @@
         setExternalBLOBs(false);
     }
 
+    /**
+     * Returns the configured Oracle table space.
+     * @return the configured Oracle table space.
+     */
+    public String getTableSpace() {
+        return tableSpace;
+    }
+
+    /**
+     * Sets the Oracle table space.
+     * @param tableSpace the Oracle table space.
+     */
+    public void setTableSpace(String tableSpace) {
+        if (tableSpace != null) {
+            this.tableSpace = tableSpace.trim();
+        } else {
+            this.tableSpace = null;
+        }
+    }
+
     public void init(PMContext context) throws Exception {
         // init default values
         if (getDriver() == null) {
@@ -104,6 +133,21 @@
      */
     protected boolean checkTablesWithUser() {
         return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected String createSchemaSQL(String sql) {
+        sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix).trim();
+        // set the tablespace if it is defined
+        String tspace;
+        if (tableSpace == null || "".equals(tableSpace)) {
+            tspace = "";
+        } else {
+            tspace = "tablespace " + tableSpace;
+        }
+        return Text.replace(sql, TABLE_SPACE_VARIABLE, tspace).trim();
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
Fri Jul 20 15:44:47 2007
@@ -61,6 +61,7 @@
  * <li><code>user</code>: the database user</li>
  * <li><code>password</code>: the user's password</li>
  * <li><code>schemaObjectPrefix</code>: prefix to be prepended to schema
objects</li>
+ * <li><code>tableSpace</code>: the tablespace to use</li>
  * <li><code>externalBLOBs</code>: if <code>true</code> (the
default) BINARY
  * values (BLOBs) are stored in the local file system;
  * if <code>false</code> BLOBs are stored in the database</li>
@@ -74,6 +75,7 @@
  *       &lt;param name="user" value="scott"/&gt;
  *       &lt;param name="password" value="tiger"/&gt;
  *       &lt;param name="schemaObjectPrefix" value="${wsp.name}_"/&gt;
+ *       &lt;param name="tableSpace" value=""/&gt;
  *       &lt;param name="externalBLOBs" value="false"/&gt;
  *  &lt;/PersistenceManager&gt;
  * </pre>
@@ -89,6 +91,13 @@
     private Integer DURATION_SESSION_CONSTANT;
     private Integer MODE_READWRITE_CONSTANT;
 
+    /** the variable for the Oracle table space */
+    public static final String TABLE_SPACE_VARIABLE =
+        "${tableSpace}";
+
+    /** the Oracle table space to use */
+    protected String tableSpace;
+
     /**
      * Creates a new <code>OraclePersistenceManager</code> instance.
      */
@@ -102,6 +111,26 @@
         initialized = false;
     }
 
+    /**
+     * Returns the configured Oracle table space.
+     * @return the configured Oracle table space.
+     */
+    public String getTableSpace() {
+        return tableSpace;
+    }
+
+    /**
+     * Sets the Oracle table space.
+     * @param tableSpace the Oracle table space.
+     */
+    public void setTableSpace(String tableSpace) {
+        if (tableSpace != null) {
+            this.tableSpace = tableSpace.trim();
+        } else {
+            this.tableSpace = null;
+        }
+    }
+
     //---------------------------------< SimpleDbPersistenceManager overrides >
     /**
      * {@inheritDoc}
@@ -297,6 +326,16 @@
                     if (!sql.startsWith("#") && sql.length() > 0) {
                         // replace prefix variable
                         sql = Text.replace(sql, SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix);
+
+                        // set the tablespace if it is defined
+                        String tspace;
+                        if (tableSpace == null || "".equals(tableSpace)) {
+                            tspace = "";
+                        } else {
+                            tspace = "tablespace " + tableSpace;
+                        }
+                        sql = Text.replace(sql, TABLE_SPACE_VARIABLE, tspace).trim();
+
                         // execute sql stmt
                         stmt.executeUpdate(sql);
                     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/fs/db/oracle.ddl
Fri Jul 20 15:44:47 2007
@@ -12,5 +12,5 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
-create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar2(2048) not null, FSENTRY_NAME
varchar2(255) not null, FSENTRY_DATA blob null, FSENTRY_LASTMOD number(38,0) not null, FSENTRY_LENGTH
number(38,0) null)
-create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH,
FSENTRY_NAME)
+create table ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH varchar2(2048) not null, FSENTRY_NAME
varchar2(255) not null, FSENTRY_DATA blob null, FSENTRY_LASTMOD number(38,0) not null, FSENTRY_LENGTH
number(38,0) null) ${tableSpace}
+create unique index ${schemaObjectPrefix}FSENTRY_IDX on ${schemaObjectPrefix}FSENTRY (FSENTRY_PATH,
FSENTRY_NAME) ${tableSpace}

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/journal/oracle.ddl
Fri Jul 20 15:44:47 2007
@@ -12,10 +12,10 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
-create table ${schemaObjectPrefix}JOURNAL (REVISION_ID number(20,0) NOT NULL, JOURNAL_ID
varchar(255), PRODUCER_ID varchar(255), REVISION_DATA blob)
-create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID)
-create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID number(20,0) NOT NULL)
-create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION
(REVISION_ID)
+create table ${schemaObjectPrefix}JOURNAL (REVISION_ID number(20,0) NOT NULL, JOURNAL_ID
varchar(255), PRODUCER_ID varchar(255), REVISION_DATA blob) ${tableSpace}
+create unique index ${schemaObjectPrefix}JOURNAL_IDX on ${schemaObjectPrefix}JOURNAL (REVISION_ID)
${tableSpace}
+create table ${schemaObjectPrefix}GLOBAL_REVISION (REVISION_ID number(20,0) NOT NULL) ${tableSpace}
+create unique index ${schemaObjectPrefix}GLOBAL_REVISION_IDX on ${schemaObjectPrefix}GLOBAL_REVISION
(REVISION_ID) ${tableSpace}
 
 # Inserting the one and only revision counter record now helps avoiding race conditions
 insert into ${schemaObjectPrefix}GLOBAL_REVISION VALUES(0)

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/bundle/oracle.ddl
Fri Jul 20 15:44:47 2007
@@ -1,13 +1,13 @@
-create table ${schemaObjectPrefix}BUNDLE (NODE_ID raw(16) not null, BUNDLE_DATA blob not
null)
-create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID)
+create table ${schemaObjectPrefix}BUNDLE (NODE_ID raw(16) not null, BUNDLE_DATA blob not
null) ${tableSpace}
+create unique index ${schemaObjectPrefix}BUNDLE_IDX on ${schemaObjectPrefix}BUNDLE (NODE_ID)
${tableSpace}
 
-create table ${schemaObjectPrefix}REFS (NODE_ID raw(16) not null, REFS_DATA blob not null)
-create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID)
+create table ${schemaObjectPrefix}REFS (NODE_ID raw(16) not null, REFS_DATA blob not null)
${tableSpace}
+create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID)
${tableSpace}
 
-create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar2(64) not null, BINVAL_DATA blob
null)
-create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID)
+create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar2(64) not null, BINVAL_DATA blob
null) ${tableSpace}
+create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID)
${tableSpace}
 
-create table ${schemaObjectPrefix}NAMES (ID INTEGER primary key, NAME varchar2(255) not null)
-create unique index ${schemaObjectPrefix}NAMES_IDX on ${schemaObjectPrefix}NAMES (NAME)
+create table ${schemaObjectPrefix}NAMES (ID INTEGER primary key, NAME varchar2(255) not null)
${tableSpace}
+create unique index ${schemaObjectPrefix}NAMES_IDX on ${schemaObjectPrefix}NAMES (NAME) ${tableSpace}
 create sequence ${schemaObjectPrefix}seq_names_id
 create trigger ${schemaObjectPrefix}t1 before insert on ${schemaObjectPrefix}NAMES for each
row begin select ${schemaObjectPrefix}seq_names_id.nextval into :new.id from dual; end;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/oracle.ddl
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/oracle.ddl?view=diff&rev=558187&r1=558186&r2=558187
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/oracle.ddl
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/persistence/db/oracle.ddl
Fri Jul 20 15:44:47 2007
@@ -12,11 +12,11 @@
 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
-create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null, NODE_DATA blob not null)
-create unique index ${schemaObjectPrefix}NODE_IDX on ${schemaObjectPrefix}NODE (NODE_ID)
-create table ${schemaObjectPrefix}PROP (PROP_ID varchar2(1024) not null, PROP_DATA blob not
null)
-create unique index ${schemaObjectPrefix}PROP_IDX on ${schemaObjectPrefix}PROP (PROP_ID)
-create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA blob not null)
-create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID)
-create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar2(1024) not null, BINVAL_DATA
blob null)
-create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID)
+create table ${schemaObjectPrefix}NODE (NODE_ID char(36) not null, NODE_DATA blob not null)
${tableSpace}
+create unique index ${schemaObjectPrefix}NODE_IDX on ${schemaObjectPrefix}NODE (NODE_ID)
${tableSpace}
+create table ${schemaObjectPrefix}PROP (PROP_ID varchar2(1024) not null, PROP_DATA blob not
null) ${tableSpace}
+create unique index ${schemaObjectPrefix}PROP_IDX on ${schemaObjectPrefix}PROP (PROP_ID)
${tableSpace}
+create table ${schemaObjectPrefix}REFS (NODE_ID char(36) not null, REFS_DATA blob not null)
${tableSpace}
+create unique index ${schemaObjectPrefix}REFS_IDX on ${schemaObjectPrefix}REFS (NODE_ID)
${tableSpace}
+create table ${schemaObjectPrefix}BINVAL (BINVAL_ID varchar2(1024) not null, BINVAL_DATA
blob null) ${tableSpace}
+create unique index ${schemaObjectPrefix}BINVAL_IDX on ${schemaObjectPrefix}BINVAL (BINVAL_ID)
${tableSpace}



Mime
View raw message