Flyway Setting and Table Info

2024-04-10 07:32
文章标签 table info setting flyway

本文主要是介绍Flyway Setting and Table Info,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

  • Flyway Setting and Table Info
    • 1. Dependencies
    • 2. Configuration
    • 3. Table Name flyway_schema_history
    • 4. Log
    • Error

Flyway Setting and Table Info

1. Dependencies

        <dependency><groupId>org.flywaydb</groupId><artifactId>flyway-core</artifactId></dependency><dependency><groupId>org.postgresql</groupId><artifactId>postgresql</artifactId><scope>runtime</scope></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-jdbc</artifactId></dependency>

2. Configuration

  flyway:enabled: truebaseline-on-migrate: true
    <!-- Spring Datasource --><bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"><property name="driverClass" value="${idm.persistence.connection.driver.class}" /><property name="jdbcUrl" value="${idm.persistence.connection.url}" /><property name="user" value="${idm.persistence.connection.username}" /><property name="password" value="${idm.persistence.connection.password}" /></bean>
# Database connection settings
idm.persistence.connection.driver.class = org.postgresql.Driver
# Update this url to have your correct information
idm.persistence.connection.url = @pg.url@
# Database connection user settings
idm.persistence.connection.username = @pg.user@
idm.persistence.connection.password = @pg.password@
 <profiles><profile><id>env-my</id><activation><property><name>env</name><value>local</value></property></activation><properties><redis.host>192.168.99.100</redis.host><redis.port>6379</redis.port><redirect.uris>https://localhost:3000/auth_code/callback</redirect.uris><register.server>192.168.99.100:8848</register.server><api.gateway.register.ip>127.0.0.1</api.gateway.register.ip><idm.host>localhost:8088</idm.host><idm.real.ip>localhost</idm.real.ip><demo.resserver.domainorip>localhost</demo.resserver.domainorip><pg.url>jdbc:postgresql://204.104.116.128:5432/idmprod_20190927</pg.url><pg.user>postgres</pg.user><pg.password>postgres</pg.password><dxcuser.domain>VPC_INT</dxcuser.domain><accesstoken.uri>https://localhost:8088/oauth/token</accesstoken.uri><user.authorization.uri>https://localhost:8088/oauth/authorize</user.authorization.uri><userinfo.uri>https://localhost:8088/user</userinfo.uri><tokenidm.uri>https://aaaaa-apigw-vip.ft1core.mcloud.entsvcs.net:5001/v3</tokenidm.uri><auth.server.port>8088</auth.server.port><env>local</env></properties></profile>

3. Table Name flyway_schema_history

4. Log

2020-03-09 17:40:33.884  INFO 20184 --- [           main] o.f.c.internal.license.VersionPrinter    : Flyway Community Edition 5.2.4 by Boxfuse
2020-03-09 17:40:33.896  INFO 20184 --- [           main] o.f.c.internal.database.DatabaseFactory  : Database: jdbc:postgresql://204.104.116.128:5432/idmprod_20190927 (PostgreSQL 9.5)
2020-03-09 17:40:37.837  INFO 20184 --- [           main] o.f.core.internal.command.DbValidate     : Successfully validated 2 migrations (execution time 00:01.123s)
2020-03-09 17:40:39.795  INFO 20184 --- [           main] o.f.c.i.s.JdbcTableSchemaHistory         : Creating Schema History table: "public"."flyway_schema_history"
2020-03-09 17:40:46.945  INFO 20184 --- [           main] o.f.core.internal.command.DbBaseline     : Successfully baselined schema with version: 1
2020-03-09 17:40:48.969  INFO 20184 --- [           main] o.f.core.internal.command.DbMigrate      : Current version of schema "public": 1
2020-03-09 17:40:48.970  INFO 20184 --- [           main] o.f.core.internal.command.DbMigrate      : Migrating schema "public" to version 2 - create
2020-03-09 17:40:55.034  INFO 20184 --- [           main] o.f.core.internal.command.DbMigrate      : Successfully applied 1 migration to schema "public" (execution time 00:08.085s)

Error

2020-03-11 14:09:46.261 WARN 11976 — [ main] o.f.c.i.s.JdbcTableSchemaHistory : Could not find schema history table “public”.“flyway_schema_history”, but found “public”.“schema_version” instead. You are seeing this message because Flyway changed its default for flyway.table in version 5.0.0 to flyway_schema_history and you are still relying on the old default (schema_version). Set flyway.table=schema_version in your configuration to fix this. This fallback mechanism will be removed in Flyway 6.0.0.

Delete old table “schema_version” to fix the problem.

这篇关于Flyway Setting and Table Info的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/890423

相关文章

Java实现自定义table宽高的示例代码

《Java实现自定义table宽高的示例代码》在桌面应用、管理系统乃至报表工具中,表格(JTable)作为最常用的数据展示组件,不仅承载对数据的增删改查,还需要配合布局与视觉需求,而JavaSwing... 目录一、项目背景详细介绍二、项目需求详细介绍三、相关技术详细介绍四、实现思路详细介绍五、完整实现代码

MySQL的ALTER TABLE命令的使用解读

《MySQL的ALTERTABLE命令的使用解读》:本文主要介绍MySQL的ALTERTABLE命令的使用,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1、查看所建表的编China编程码格式2、修改表的编码格式3、修改列队数据类型4、添加列5、修改列的位置5.1、把列

Pandas透视表(Pivot Table)的具体使用

《Pandas透视表(PivotTable)的具体使用》透视表用于在数据分析和处理过程中进行数据重塑和汇总,本文就来介绍一下Pandas透视表(PivotTable)的具体使用,感兴趣的可以了解一下... 目录前言什么是透视表?使用步骤1. 引入必要的库2. 读取数据3. 创建透视表4. 查看透视表总结前言

GORM中Model和Table的区别及使用

《GORM中Model和Table的区别及使用》Model和Table是两种与数据库表交互的核心方法,但它们的用途和行为存在著差异,本文主要介绍了GORM中Model和Table的区别及使用,具有一... 目录1. Model 的作用与特点1.1 核心用途1.2 行为特点1.3 示例China编程代码2. Tab

linux报错INFO:task xxxxxx:634 blocked for more than 120 seconds.三种解决方式

《linux报错INFO:taskxxxxxx:634blockedformorethan120seconds.三种解决方式》文章描述了一个Linux最小系统运行时出现的“hung_ta... 目录1.问题描述2.解决办法2.1 缩小文件系统缓存大小2.2 修改系统IO调度策略2.3 取消120秒时间限制3

使用@Slf4j注解,log.info()无法使用问题

《使用@Slf4j注解,log.info()无法使用问题》在使用Lombok的@Slf4j注解打印日志时遇到问题,通过降低Lombok版本(从1.18.x降至1.16.10)解决了问题... 目录@Slf4androidj注解,log.info()无法使用问题最后解决总结@Slf4j注解,log.info(

vue2实践:el-table实现由用户自己控制行数的动态表格

需求 项目中需要提供一个动态表单,如图: 当我点击添加时,便添加一行;点击右边的删除时,便删除这一行。 至少要有一行数据,但是没有上限。 思路 这种每一行的数据固定,但是不定行数的,很容易想到使用el-table来实现,它可以循环读取:data所绑定的数组,来生成行数据,不同的是: 1、table里面的每一个cell,需要放置一个input来支持用户编辑。 2、最后一列放置两个b

通过Ajax请求后台数据,返回JSONArray(JsonObject),页面(Jquery)以table的形式展示

点击“会商人员情况表”,弹出层,显示一个表格,如下图: 利用Ajax和Jquery和JSONArray和JsonObject来实现: 代码如下: 在hspersons.html中: <!DOCTYPE html><html><head><meta charset="UTF-8"><title>会商人员情况表</title><script type="text/javasc

UVa 10820 Send a Table (Farey数列欧拉函数求和)

这里先说一下欧拉函数的求法 先说一下筛选素数的方法 void Get_Prime(){ /*筛选素数法*/for(int i = 0; i < N; i++) vis[i] = 1;vis[0] = vis[1] = 0;for(int i = 2; i * i < N; i++)if(vis[i]){for(int j = i * i; j < N; j += i)vis[j] =

css-table

设置table的文字不换行:给th,td添加white-space: nowrap; 设置单元格内容及其边框的距离:使用html的cellpadding属性,还有一种方式设置padding。在CSS中,table, th, td{padding:0;}效果等同于cellpadding="0″。 设置table的单元格边距:border-spacing如果定义一个 length 参数,那么定义的是水