Skip to content

Commit

Permalink
Merge pull request #594 from spacious-team/dependabot/maven/com.h2dat…
Browse files Browse the repository at this point in the history
…abase-h2-2.2.220

Автоматическая миграция БД H2 при обновлении
  • Loading branch information
vananiev committed May 4, 2024
2 parents d1b53af + 212a192 commit 5868a4b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version> <!-- TODO migrate DB to actual H2 format -->
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/ru/investbook/InvestbookProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public class InvestbookProperties {

private Path reportBackupPath = dataPath.resolve("report-backups");

private List<Path> sqlImportFiles = List.of(dataPath.resolve("export-2022.9.sql"));
private List<Path> sqlImportFiles = List.of(
dataPath.resolve("export-2022.9.sql"),
dataPath.resolve("export-2024.1.x.sql"));

private boolean openHomePageAfterStart = false;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#spring.datasource.driver-class-name=org.mariadb.jdbc.Driver

# H2
spring.datasource.url=jdbc:h2:file:~/investbook2-test;mode=mysql;non_keywords=value
spring.datasource.url=jdbc:h2:file:~/investbook3-test;mode=mysql;non_keywords=value
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.datasource.username = sa
spring.datasource.password =
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-h2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

spring.datasource.url=jdbc:h2:file:~/investbook/investbook2;mode=mysql;non_keywords=value
spring.datasource.url=jdbc:h2:file:~/investbook/investbook3;mode=mysql;non_keywords=value
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
spring.datasource.username = sa
spring.datasource.password =
Expand Down

0 comments on commit 5868a4b

Please sign in to comment.