Mise à jour du gestionnaire de base de données

This commit is contained in:
FyloZ 2021-05-20 13:37:31 -04:00
parent 5b3524dae9
commit b43f7ca357
3 changed files with 22 additions and 2 deletions

View File

@ -35,7 +35,7 @@ dependencies {
implementation("io.jsonwebtoken:jjwt:0.9.1")
implementation("org.apache.poi:poi-ooxml:4.1.0")
implementation("org.apache.pdfbox:pdfbox:2.0.4")
implementation("dev.fyloz.colorrecipesexplorer:database-manager:1.2.0")
implementation("dev.fyloz.colorrecipesexplorer:database-manager:5.1")
implementation("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}")
implementation("org.springframework.boot:spring-boot-starter-jdbc:${springBootVersion}")

View File

@ -11,7 +11,7 @@ import org.springframework.context.annotation.Configuration
import org.springframework.core.env.Environment
import javax.sql.DataSource
const val SUPPORTED_DATABASE_VERSION = 4
const val SUPPORTED_DATABASE_VERSION = 5
const val ENV_VAR_ENABLE_DATABASE_UPDATE_NAME = "CRE_ENABLE_DB_UPDATE"
val DATABASE_NAME_REGEX = Regex("(\\w+)$")

View File

@ -0,0 +1,20 @@
package dev.fyloz.colorrecipesexplorer.model
import java.time.LocalDateTime
import javax.persistence.Column
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table
@Entity
@Table(name = "configuration")
data class Configuration(
@Id
@Column(name = "config_key")
val key: String,
val content: String,
@Column(name = "last_updated")
val lastUpdated: LocalDateTime
)