首页 > 解决方案 > Liquibase 不在 Postgresql 数据库中记录更改集

问题描述

我正在尝试使用 liquibase 进行 postgresql 数据库版本控制,并遵循官方链接中给出的信息。

  1. 创建了一个测试数据库并使用 commandline 添加了一个 tag="baseline" 。这记录在 Changelog 表中。

    liquibase --driver= org.postgresql.Driver --classpath=./lib/postgresql-42.2.5.jar --url=jdbc:postgresql://localhost:5432/lpoc --username=postgres --password=emr123 tag=baseline
    
    Successfully tagged postgres@jdbc:postgresql://localhost:5432/lpoc
    Liquibase 'tag' Successful
    
  2. 创建了一个表并在其中添加了列。这没有记录为 Changelog 表中的更改集。 创建表后的更改日志表

  3. 当向新创建的表添加新列时,在 changelog.xml 文件和 changelog table 中检查时,它不会显示为变更集标记。

标签: liquibase

解决方案


推荐阅读