sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkatran...@apache.org
Subject git commit: SQOOP-1211: Sqoop2: Derby repo: Sync maximal length of versions (Jarek Jarcec Cecho via Venkat Ranganathan)
Date Mon, 07 Oct 2013 19:14:50 GMT
Updated Branches:
  refs/heads/sqoop2 1ce0923b6 -> caf4d824c


SQOOP-1211: Sqoop2: Derby repo: Sync maximal length of versions
 (Jarek Jarcec Cecho via Venkat Ranganathan)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/caf4d824
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/caf4d824
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/caf4d824

Branch: refs/heads/sqoop2
Commit: caf4d824c1e8920324f28dd9de7d62cb2d87ca57
Parents: 1ce0923
Author: Venkat Ranganathan <venkat@hortonworks.com>
Authored: Mon Oct 7 12:14:38 2013 -0700
Committer: Venkat Ranganathan <venkat@hortonworks.com>
Committed: Mon Oct 7 12:14:38 2013 -0700

----------------------------------------------------------------------
 .../apache/sqoop/repository/derby/DerbyRepoConstants.java    | 7 +++++--
 .../sqoop/repository/derby/DerbyRepositoryHandler.java       | 1 +
 .../org/apache/sqoop/repository/derby/DerbySchemaQuery.java  | 8 ++++++--
 3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/caf4d824/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoConstants.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoConstants.java
b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoConstants.java
index 200293d..030dde7 100644
--- a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoConstants.java
+++ b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepoConstants.java
@@ -31,12 +31,15 @@ public final class DerbyRepoConstants {
    * History:
    * 0 - empty/unknown state
    * 1 - First two releases (1.99.1, 1.99.2)
-   * 2 - added SQ_SYSTEM, SQ_CONNECTION add column ENABLED,
+   * 2 - Version 1.99.3
+   *     added SQ_SYSTEM, SQ_CONNECTION add column ENABLED,
    *     SQ_CONNECTION add column CREATION_USER, SQ_CONNECTION add column UPDATE_USER,
    *     SQ_JOB add column ENABLED, SQ_JOB add column CREATION_USER,
    *     SQ_JOB add column UPDATE_USER, SQ_SUBMISSION add column CREATION_USER,
    *     SQ_SUBMISSION add column UPDATE_USER
-   * 3 - SQ_SUBMISSION modified SQS_EXTERNAL_ID varchar(50)
+   * 3 - Version 1.99.4
+   *     SQ_SUBMISSION modified SQS_EXTERNAL_ID varchar(50)
+   *     Increased size of SQ_CONNECTOR.SQC_VERSION to 64
    */
   public static final int VERSION = 3;
 

http://git-wip-us.apache.org/repos/asf/sqoop/blob/caf4d824/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
index 851e36c..4f002bb 100644
--- a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
+++ b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbyRepositoryHandler.java
@@ -397,6 +397,7 @@ public class DerbyRepositoryHandler extends JdbcRepositoryHandler {
     }
     if(version <= 2) {
       runQuery(QUERY_UPGRADE_TABLE_SQ_SUBMISSION_MODIFY_COLUMN_SQS_EXTERNAL_ID_VARCHAR_50,
conn);
+      runQuery(QUERY_UPGRADE_TABLE_SQ_CONNECTOR_MODIFY_COLUMN_SQC_VERSION_VARCHAR_64, conn);
     }
 
     ResultSet rs = null;

http://git-wip-us.apache.org/repos/asf/sqoop/blob/caf4d824/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
index 8016ad8..c470211 100644
--- a/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
+++ b/repository/repository-derby/src/main/java/org/apache/sqoop/repository/derby/DerbySchemaQuery.java
@@ -43,7 +43,7 @@ import static org.apache.sqoop.repository.derby.DerbySchemaConstants.*;
  *    | SQC_ID: BIGINT PK AUTO-GEN |
  *    | SQC_NAME: VARCHAR(64)      |
  *    | SQC_CLASS: VARCHAR(255)    |
- *    | SQC_VERSION: VARCHAR(25)   |
+ *    | SQC_VERSION: VARCHAR(64)   |
  *    +----------------------------+
  * </pre>
  * </p>
@@ -218,7 +218,7 @@ public final class DerbySchemaQuery {
       + COLUMN_SQC_ID + " BIGINT GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY
1) PRIMARY KEY, "
       + COLUMN_SQC_NAME + " VARCHAR(64), "
       + COLUMN_SQC_CLASS + " VARCHAR(255), "
-      + COLUMN_SQC_VERSION + " VARCHAR(25) "
+      + COLUMN_SQC_VERSION + " VARCHAR(64) "
       + ")";
 
   // DDL: Create table SQ_FORM
@@ -945,6 +945,10 @@ public final class DerbySchemaQuery {
     "DELETE FROM " + TABLE_SQ_COUNTER_SUBMISSION
     + " WHERE " + COLUMN_SQRS_SUBMISSION + " = ?";
 
+  // DDL: Increased size of SQ_CONNECTOR.SQC_VERSION to 64
+  public static final String QUERY_UPGRADE_TABLE_SQ_CONNECTOR_MODIFY_COLUMN_SQC_VERSION_VARCHAR_64
=
+    "ALTER TABLE " + TABLE_SQ_CONNECTOR + " ALTER COLUMN "
+      + COLUMN_SQC_VERSION + " SET DATA TYPE VARCHAR(64)";
 
   private DerbySchemaQuery() {
     // Disable explicit object creation


Mime
View raw message