Skip to content

Commit 9a382fa

Browse files
authored
Merge pull request #596 from spacious-team/hotfix-2024.1.1
Релиз 2024.1.1
2 parents d268a97 + 19f6240 commit 9a382fa

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</parent>
2929
<groupId>ru.investbook</groupId>
3030
<artifactId>investbook</artifactId>
31-
<version>2024.1</version>
31+
<version>2024.1.1</version>
3232

3333
<name>investbook</name>
3434
<description>Investor Accounting Book</description>
@@ -62,7 +62,7 @@
6262

6363
<properties>
6464
<!-- Valid version is (0-255).(0-255).(0-65535) -->
65-
<win.msi.version>24.1</win.msi.version>
65+
<win.msi.version>24.1.1</win.msi.version>
6666
<java.version>21</java.version>
6767
</properties>
6868

@@ -96,12 +96,12 @@
9696
<dependency>
9797
<groupId>com.github.spacious-team</groupId>
9898
<artifactId>broker-report-parser-api</artifactId>
99-
<version>2023.1</version>
99+
<version>2024.1</version>
100100
</dependency>
101101
<dependency>
102102
<groupId>com.github.spacious-team</groupId>
103103
<artifactId>table-wrapper-spring-boot-starter</artifactId>
104-
<version>2023.1</version>
104+
<version>2024.1</version>
105105
</dependency>
106106
<dependency>
107107
<groupId>org.springframework.boot</groupId>

src/main/java/ru/investbook/upgrade/SqlDataExporter.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
@Service
3535
@RequiredArgsConstructor
3636
public class SqlDataExporter {
37-
private static final String EXPORT_FILE_NAME = "export-2022.9.sql";
38-
private final String expectedInvestbookVersionsForExport = "2022.9";
37+
private static final String INVESTBOOK_VERSION_PREFIX_FOR_EXPORT = "2024.1.";
38+
private static final String EXPORT_FILE_NAME = "export-2024.1.x.sql";
3939
private final BuildProperties buildProperties;
4040
private final InvestbookProperties investbookProperties;
4141
private final JdbcTemplate jdbcTemplate;
4242

4343
@PreDestroy
4444
public void preDestroy() {
4545
String version = buildProperties.getVersion();
46-
if (version.startsWith(expectedInvestbookVersionsForExport)) {
46+
if (version.startsWith(INVESTBOOK_VERSION_PREFIX_FOR_EXPORT)) {
4747
Path file = investbookProperties.getDataPath()
4848
.resolve(EXPORT_FILE_NAME)
4949
.toAbsolutePath();
@@ -54,6 +54,7 @@ public void preDestroy() {
5454
private void exportSqlData(Path file) {
5555
try {
5656
Instant t0 = Instant.now();
57+
// DROP is required to delete tables created by Flyway
5758
jdbcTemplate.execute("SCRIPT DROP TO '" + file + "' CHARSET 'UTF-8'");
5859
Instant t1 = Instant.now();
5960
log.info("Экспорт БД в файл '{}' завершен за {}", file, Duration.between(t0, t1));

0 commit comments

Comments
 (0)