Skip to content

Commit

Permalink
Remove clear datastore function (#13088)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCwy authored Apr 24, 2024
1 parent 620e05d commit b0c36b0
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/client/java/teammates/client/scripts/sql/SeedDb.java
Original file line number Diff line number Diff line change
Expand Up @@ -470,21 +470,6 @@ private Account createAccount(String googleId, String accountName, String email)
return account;
}

/**
* Clears all entities in the data store if re-seeding is needed.
*/
private void clearDataStore() {
ofy().delete().entities(ofy().load().type(Account.class).list()).now();
ofy().delete().entities(ofy().load().type(AccountRequest.class).list()).now();
ofy().delete().entities(ofy().load().type(Course.class).list()).now();
ofy().delete().entities(ofy().load().type(CourseStudent.class).list()).now();
ofy().delete().entities(ofy().load().type(FeedbackQuestion.class).list()).now();
ofy().delete().entities(ofy().load().type(FeedbackResponse.class).list()).now();
ofy().delete().entities(ofy().load().type(FeedbackResponseComment.class).list()).now();
ofy().delete().entities(ofy().load().type(FeedbackSession.class).list()).now();
ofy().delete().entities(ofy().load().type(Notification.class).list()).now();
log("Finish deleting all entities");
}

private void log(String logLine) {
System.out.println(String.format("Seeding database: %s", logLine));
Expand All @@ -497,7 +482,6 @@ protected void persistData() {
// Persisting basic data bundle
DataBundle dataBundle = getTypicalDataBundle();
try {
clearDataStore();
// logic.persistDataBundle(dataBundle);
persistAdditionalData();
} catch (Exception e) {
Expand Down

0 comments on commit b0c36b0

Please sign in to comment.