如何使用spring、quarkus、flyway、hibernate和multitenancy在所有模式中运行迁移?

hujrc8aj  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(336)

早上好,我正在尝试用flyway、hibernate、panache和multi-tenant建立一个quarkus项目。但是脚本只在第一个模式上运行一次,有人知道如何在其他模式上运行吗?
应用程序.yml

datasource:
   db-kind: postgres
   username: postgres
   password: 1234
   jdbc:
     url: jdbc:postgresql://localhost:5432/postgres
     driver: org.postgresql.Driver
 hibernate-orm:
   multitenant: SCHEMA
   dialect: org.hibernate.dialect.PostgreSQLDialect
   log:
     sql: true
 flyway:
   migrate-at-start: true
   baseline-on-migrate: true
   baseline-version: 1.0.0
   create-schemas: true
   clean-at-start: true
   schemas: maripa, bicas, rhino
   locations: db/migration/maripa, db/migration/bicas, db/migration/rhino

日志

__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2021-03-09 07:41:54,213 INFO  [io.qua.fly.FlywayProcessor] (build-13) Adding application migrations in path '/home/idd_acosta/freelas/rhino/rhino-api/target/classes/db/migration/maripa/' using protocol 'file'
2021-03-09 07:41:54,844 INFO  [io.qua.arc.pro.BeanProcessor] (build-8) Found unrecommended usage of private members (use package-private instead) in application beans:
    - @Inject field br.com.rhino.user.mapper.RoleMapperImpl#permissionMapper,
    - @Inject field br.com.rhino.user.mapper.UserMapperImpl#roleMapper
2021-03-09 07:41:56,228 INFO  [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread) Flyway Community Edition 7.5.2 by Redgate
2021-03-09 07:41:56,348 INFO  [org.fly.cor.int.dat.bas.DatabaseType] (Quarkus Main Thread) Database: jdbc:postgresql://localhost:5432/postgres (PostgreSQL 13.1)
2021-03-09 07:41:56,380 INFO  [org.fly.cor.int.com.DbClean] (Quarkus Main Thread) Successfully dropped pre-schema database level objects (execution time 00:00.001s)
2021-03-09 07:41:56,426 INFO  [org.fly.cor.int.com.DbClean] (Quarkus Main Thread) Successfully dropped schema "maripa" (execution time 00:00.044s)
2021-03-09 07:41:56,428 INFO  [org.fly.cor.int.com.DbClean] (Quarkus Main Thread) Successfully dropped schema " bicas" (execution time 00:00.001s)
2021-03-09 07:41:56,430 INFO  [org.fly.cor.int.com.DbClean] (Quarkus Main Thread) Successfully dropped schema " rhino" (execution time 00:00.001s)
2021-03-09 07:41:56,430 INFO  [org.fly.cor.int.com.DbClean] (Quarkus Main Thread) Successfully dropped post-schema database level objects (execution time 00:00.000s)
2021-03-09 07:41:56,432 INFO  [org.fly.cor.int.lic.VersionPrinter] (Quarkus Main Thread) Flyway Community Edition 7.5.2 by Redgate
2021-03-09 07:41:56,437 INFO  [org.fly.cor.int.dat.bas.Schema] (Quarkus Main Thread) Creating schema "maripa" ...
2021-03-09 07:41:56,439 INFO  [org.fly.cor.int.dat.bas.Schema] (Quarkus Main Thread) Creating schema " bicas" ...
2021-03-09 07:41:56,439 INFO  [org.fly.cor.int.dat.bas.Schema] (Quarkus Main Thread) Creating schema " rhino" ...
2021-03-09 07:41:56,443 INFO  [org.fly.cor.int.sch.JdbcTableSchemaHistory] (Quarkus Main Thread) Creating Schema History table "maripa"."flyway_schema_history" ...
2021-03-09 07:41:56,487 INFO  [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Current version of schema "maripa": null
2021-03-09 07:41:56,496 INFO  [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Migrating schema "maripa" to version "1.0.1 - start structure maripa"
2021-03-09 07:41:56,555 INFO  [org.fly.cor.int.com.DbMigrate] (Quarkus Main Thread) Successfully applied 1 migration to schema "maripa" (execution time 00:00.078

我的路径scrpts
如您所见,它只在第一个模式中运行。如何在这三种情况下跑步?
旁白:对不起我的英语!:)

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题