Merge branch '45-definir-les-noms-des-tables-et-des-colonnes' into 'master'

Resolve "Définir les noms des tables et des colonnes"

See merge request color-recipes-explorer/backend!5
This commit is contained in:
William Nolin 2021-03-04 22:26:26 +00:00
commit 4995bf14e9
13 changed files with 20 additions and 12 deletions

View File

@ -32,7 +32,7 @@ test:
- docker run --name $TEST_CONTAINER_NAME $CI_REGISTRY_IMAGE_GRADLE gradle test
after_script:
- mkdir test-results && docker cp $TEST_CONTAINER_NAME:/usr/src/cre/build/test-results/test/ test-results
- docker rm $TEST_CONTAINER_NAME
- docker rm $TEST_CONTAINER_NAME || true
artifacts:
when: always
reports:

View File

@ -13,6 +13,10 @@ plugins {
repositories {
mavenCentral()
maven {
url = uri("https://git.fyloz.dev/api/v4/projects/40/packages/maven")
}
}
dependencies {
@ -47,6 +51,10 @@ dependencies {
runtimeOnly("com.h2database:h2:1.4.199")
runtimeOnly("mysql:mysql-connector-java:8.0.22")
runtimeOnly("org.postgresql:postgresql:42.2.16")
runtimeOnly("com.microsoft.sqlserver:mssql-jdbc:9.2.1.jre11")
compileOnly("org.projectlombok:lombok:1.18.10")
}

View File

@ -131,7 +131,7 @@ private const val GROUP_PERMISSIONS_EMPTY_MESSAGE = "Au moins une permission est
@Table(name = "employee_group")
data class EmployeeGroup(
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override var id: Long? = null,
@Column(unique = true)
@ -368,4 +368,3 @@ fun employeeGroupUpdateDto(
permissions: MutableSet<EmployeePermission> = mutableSetOf(),
op: EmployeeGroupUpdateDto.() -> Unit = {}
) = EmployeeGroupUpdateDto(id, name, permissions).apply(op)

View File

@ -13,7 +13,7 @@ private const val COMPANY_NAME_NULL_MESSAGE = "Un nom est requis"
@Table(name = "company")
data class Company(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long?,
@Column(unique = true)

View File

@ -21,7 +21,7 @@ private const val MATERIAL_TYPE_NULL_MESSAGE = "Un type de produit est requis"
@Table(name = "material")
data class Material(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long?,
@Column(unique = true)

View File

@ -20,7 +20,7 @@ const val IDENTIFIER_PREFIX_NAME = "prefix"
@Table(name = "material_type")
data class MaterialType(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long? = null,
@Column(unique = true)

View File

@ -18,7 +18,7 @@ private const val MIX_MATERIAL_TYPE_NULL_MESSAGE = "Un type de prodsuit est requ
@Table(name = "mix")
data class Mix(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long?,
var location: String?,

View File

@ -8,7 +8,7 @@ import javax.persistence.*
@Table(name = "mix_material")
data class MixMaterial(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long?,
@JsonIgnore

View File

@ -9,7 +9,7 @@ const val IDENTIFIER_MATERIAL_NAME = "material"
@Table(name = "mix_type")
data class MixType(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long?,
@Column(unique = true)

View File

@ -21,7 +21,7 @@ private const val RECIPE_COMPANY_NULL_MESSAGE = "Une bannière est requise"
@Table(name = "recipe")
data class Recipe(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long?,
/** The name of the recipe. It is not unique in the entire system, but is unique in the scope of a [Company]. */

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull
@Table(name = "recipe_step")
data class RecipeStep(
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE)
@GeneratedValue(strategy = GenerationType.IDENTITY)
override val id: Long?,
@JsonIgnore

View File

@ -2,6 +2,7 @@ spring.datasource.url=jdbc:h2:mem:cre
#spring.datasource.url=jdbc:h2:file:./workdir/recipes
spring.datasource.username=sa
spring.datasource.password=LWK4Y7TvEbNyhu1yCoG3
spring.jpa.hibernate.ddl-auto=update
spring.h2.console.path=/dbconsole
spring.h2.console.enabled=true
spring.h2.console.settings.trace=false

View File

@ -27,7 +27,7 @@ spring.jpa.show-sql=true
spring.messages.fallback-to-system-locale=true
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=15MB
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.ddl-auto=none
spring.jpa.open-in-view=true
server.http2.enabled=true
server.error.whitelabel.enabled=false