Happy 2021! Fix migrations script
This commit is contained in:
@@ -11,8 +11,6 @@ import java.util.List;
|
||||
|
||||
public class V26_0_2__createExpenseYearPeriod_2020 extends BaseJavaMigration {
|
||||
private static class TransactionAccountsContainer {
|
||||
|
||||
|
||||
public final Long transactionAmount;
|
||||
public final Long fromAccountId;
|
||||
public final Long toAccountId;
|
||||
@@ -36,7 +34,7 @@ public class V26_0_2__createExpenseYearPeriod_2020 extends BaseJavaMigration {
|
||||
private static final String ACCOUNT_STATISTIC_INSERT_FROM_SQL = "INSERT INTO account_statistic(account_id, period_id, spending_total_from, transaction_count_from, spending_total_to, transaction_count_to) VALUES(?, ?, ?, 1, 0, 0)";
|
||||
private static final String ACCOUNT_STATISTIC_INSERT_TO_SQL = "INSERT INTO account_statistic(account_id, period_id, spending_total_from, transaction_count_from, spending_total_to, transaction_count_to) VALUES(?, ?, 0, 0, ?, 1)";
|
||||
|
||||
private static final String SELECT_FIRST_PERIOD_SQL = "SELECT start FROM period WHERE type = 'EXPENSE' AND start > '2020-01-01' ORDER BY start ASC";
|
||||
private static final String SELECT_FIRST_PERIOD_SQL = "SELECT start FROM period WHERE type = 'EXPENSE' AND start BETWEEN '2020-01-01' AND '2020-12-31' ORDER BY start ASC";
|
||||
|
||||
private static final String INSERT_EXPENSE_YEAR_PERIOD_SQL = "INSERT INTO period (type, start) VALUES ('EXPENSE_YEAR', ?)";
|
||||
private static final String SELECT_EXPENSE_YEAR_PERIOD_SQL = "SELECT id FROM period WHERE type = 'EXPENSE_YEAR' AND start BETWEEN '2020-01-01' AND '2020-12-31'";
|
||||
|
||||
Reference in New Issue
Block a user