Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#12048] Remove clear datastore function #13088

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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