diff --git a/src/client/java/teammates/client/connector/DatastoreClient.java b/src/client/java/teammates/client/connector/DatastoreClient.java index 991674b83a7..6b8f4510fb3 100644 --- a/src/client/java/teammates/client/connector/DatastoreClient.java +++ b/src/client/java/teammates/client/connector/DatastoreClient.java @@ -37,9 +37,9 @@ protected void doOperationRemotely() { System.out.println("Going to connect to:" + appDomain + ":" + appPort); DatastoreOptions.Builder builder = DatastoreOptions.newBuilder().setProjectId(Config.APP_ID); - if (ClientProperties.isTargetUrlDevServer()) { - builder.setHost(ClientProperties.TARGET_URL); - } + // if (ClientProperties.isTargetUrlDevServer()) { + // builder.setHost(ClientProperties.TARGET_URL); + // } ObjectifyService.init(new ObjectifyFactory(builder.build().getService())); OfyHelper.registerEntityClasses(); diff --git a/src/client/java/teammates/client/scripts/sql/NonCourseMigrationAfterMaintenanceWindow.java b/src/client/java/teammates/client/scripts/sql/NonCourseMigrationAfterMaintenanceWindow.java new file mode 100644 index 00000000000..49b9f3ab888 --- /dev/null +++ b/src/client/java/teammates/client/scripts/sql/NonCourseMigrationAfterMaintenanceWindow.java @@ -0,0 +1,18 @@ +package teammates.client.scripts.sql; + +/** + * Step 8 in the non course migration process. + */ +@SuppressWarnings("PMD") +public class NonCourseMigrationAfterMaintenanceWindow { + + public static void main(String[] args) { + try { + DataMigrationForUsageStatisticsSql.main(args); + VerifyUsageStatisticsAttributes.main(args); + VerifyNonCourseEntityCounts.main(args); + } catch (Exception e) { + System.out.println(e); + } + } +} diff --git a/src/client/java/teammates/client/scripts/sql/NonCourseMigrationBeforeMaintenanceWindow.java b/src/client/java/teammates/client/scripts/sql/NonCourseMigrationBeforeMaintenanceWindow.java new file mode 100644 index 00000000000..a76f4282cd8 --- /dev/null +++ b/src/client/java/teammates/client/scripts/sql/NonCourseMigrationBeforeMaintenanceWindow.java @@ -0,0 +1,18 @@ +package teammates.client.scripts.sql; + +/** + * Step 3 in the non course migration process. + */ +@SuppressWarnings("PMD") +public class NonCourseMigrationBeforeMaintenanceWindow { + + public static void main(String[] args) { + try { + DataMigrationForUsageStatisticsSql.main(args); + DataMigrationForAccountRequestSql.main(args); + VerifyAccountRequestAttributes.main(args); + } catch (Exception e) { + System.out.println(e); + } + } +} diff --git a/src/client/java/teammates/client/scripts/sql/NonCourseMigrationDuringMaintenanceWindow.java b/src/client/java/teammates/client/scripts/sql/NonCourseMigrationDuringMaintenanceWindow.java new file mode 100644 index 00000000000..f4f53b1d3b9 --- /dev/null +++ b/src/client/java/teammates/client/scripts/sql/NonCourseMigrationDuringMaintenanceWindow.java @@ -0,0 +1,17 @@ +package teammates.client.scripts.sql; + +/** + * Step 5 in the non course migration process. + */ +@SuppressWarnings("PMD") +public class NonCourseMigrationDuringMaintenanceWindow { + + public static void main(String[] args) { + try { + DataMigrationForAccountAndReadNotificationSql.main(args); + VerifyAccountAttributes.main(args); + } catch (Exception e) { + System.out.println(e); + } + } +} diff --git a/src/main/java/teammates/common/util/HibernateUtil.java b/src/main/java/teammates/common/util/HibernateUtil.java index 8edcca6c807..1bfec4e50b9 100644 --- a/src/main/java/teammates/common/util/HibernateUtil.java +++ b/src/main/java/teammates/common/util/HibernateUtil.java @@ -124,10 +124,10 @@ public static void buildSessionFactory(String dbUrl, String username, String pas .setProperty("hibernate.hikari.idleTimeout", "300000") .setProperty("hibernate.hikari.connectionTimeout", "30000") // Uncomment only during migration for optimized batch-insertion, batch-update, and batch-fetch. - // .setProperty("hibernate.jdbc.batch_size", "50") - // .setProperty("hibernate.order_updates", "true") - // .setProperty("hibernate.batch_versioned_data", "true") - // .setProperty("hibernate.jdbc.fetch_size", "50") + .setProperty("hibernate.jdbc.batch_size", "50") + .setProperty("hibernate.order_updates", "true") + .setProperty("hibernate.batch_versioned_data", "true") + .setProperty("hibernate.jdbc.fetch_size", "50") .addPackage("teammates.storage.sqlentity"); if (Config.IS_DEV_SERVER) {