Skip to content

Create automatically tables at startup  #748

Open
@mmaryo

Description

@mmaryo

Hello

It looks like tables are not created
Postgres stay empty

Even with spring.jpa.hibernate.ddl-auto=create

This is my entity

@Table(schema = "common", name = "\"Exchanges\"")
data class Exchanges (
    @Column("ID") @Id var id: Int = 0,
    @Column("KaikoExchangeCode") var kaikoExchangeCode: String? = null,
)

And the repository

interface ExchangesRepository : R2dbcRepository<Exchanges, Long>

I use Spring Boot 3.0.0.M1, WebFlux, Jdk 17, Kotin, R2DBC

Do you have an idea? How to debug and find a solution?

EDIT
Also I try to connect to H2 db
spring.r2dbc.url=r2dbc:h2:mem:///testdb
Connection is done
But test end with

Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Schema "COMMON" not found; SQL statement:
SELECT common."Exchanges".* FROM common."Exchanges" [90079-210]

That means the table is not created at test startup

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions