mirror of
https://github.com/apache/sqoop.git
synced 2025-05-06 20:32:17 +08:00
SQOOP-1625: Repository upgrade issue
(Qian Xu via Jarek Jarcec Cecho)
This commit is contained in:
parent
eed2b3f50a
commit
9a1135d477
@ -439,13 +439,13 @@ public void createOrUpgradeRepository(Connection conn) {
|
||||
// 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);
|
||||
}
|
||||
|
@ -580,7 +580,7 @@ public void loadJobs(int version) throws Exception {
|
||||
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 + "')");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user