You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ja...@apache.org on 2014/10/28 15:06:24 UTC

git commit: SQOOP-1625: Repository upgrade issue

Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 eed2b3f50 -> 9a1135d47


SQOOP-1625: Repository upgrade issue

(Qian Xu via Jarek Jarcec Cecho)


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

Branch: refs/heads/sqoop2
Commit: 9a1135d47783be03722dd5390bf7dddd11b101fb
Parents: eed2b3f
Author: Jarek Jarcec Cecho <ja...@apache.org>
Authored: Tue Oct 28 07:05:49 2014 -0700
Committer: Jarek Jarcec Cecho <ja...@apache.org>
Committed: Tue Oct 28 07:05:49 2014 -0700

----------------------------------------------------------------------
 .../apache/sqoop/repository/derby/DerbyRepositoryHandler.java  | 6 +++---
 .../java/org/apache/sqoop/repository/derby/DerbyTestCase.java  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/9a1135d4/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 e584a19..514b5ac 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
@@ -439,13 +439,13 @@ public class DerbyRepositoryHandler extends JdbcRepositoryHandler {
       // Change direction from VARCHAR to BIGINT + foreign key.
       updateDirections(conn, insertDirections(conn));
       renameConnectorToConfigurable(conn);
-    }
-    // Add unique constraints on job and links for version 4 onwards
-    if (repositoryVersion > 3) {
+
+      // Add unique constraints on job and links for version 4 onwards
       runQuery(QUERY_UPGRADE_TABLE_SQ_JOB_ADD_UNIQUE_CONSTRAINT_NAME, conn);
       runQuery(QUERY_UPGRADE_TABLE_SQ_LINK_ADD_UNIQUE_CONSTRAINT_NAME, conn);
       runQuery(QUERY_UPGRADE_TABLE_SQ_CONFIGURABLE_ADD_UNIQUE_CONSTRAINT_NAME, conn);
     }
+
     // last step upgrade the repository version to the latest value in the code
     upgradeRepositoryVersion(conn);
   }

http://git-wip-us.apache.org/repos/asf/sqoop/blob/9a1135d4/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
----------------------------------------------------------------------
diff --git a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
index edcef70..3398c91 100644
--- a/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
+++ b/repository/repository-derby/src/test/java/org/apache/sqoop/repository/derby/DerbyTestCase.java
@@ -580,7 +580,7 @@ abstract public class DerbyTestCase {
         for(String type : new String[] {"IMPORT", "EXPORT"}) {
           for(String name : new String[] {"JA", "JB"} ) {
             runQuery("INSERT INTO SQOOP.SQ_JOB(SQB_NAME, SQB_CONNECTION, SQB_TYPE)"
-                + " VALUES('" + name + "', 1, '" + type + "')");
+                + " VALUES('" + type + "_" + name + "', 1, '" + type + "')");
           }
         }