Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
/ dbvc Public archive

database version controller(数据库版本控制)

License

Notifications You must be signed in to change notification settings

hb0730/dbvc

Repository files navigation

dbvc

database version controller(数据库版本控制)

简介

dbvc(数据库版本控制),见名思意,用于项目升级,只需编写.sql文件后,自动进行sql的更替,省去重复步骤

如何使用

dbvc

dbvc项目时当前project core核心,其主要时通过有参构建DbvcPropertiesConnection实现脚本的运行,借助ibatis#ScriptRunner

dbvc-spring-boot-*

dbvc-spring-boot-* 则是实现spring-boot方式,依赖于spring-boot-startermybatis-spring-boot-starter 自动获取Connection,将其注入RunSqlFile

Properties

DbvcProperties如果不了解ibatis#ScriptRunner请不要轻易更改,DbvcProperties主要提供了获取脚本的url配置与生产记录的tableNameScriptRunner#delimiter分隔符 DbvcProperties还提供了是否启动enabled字段,默认状态时true

samples

https://github.com/hb0730/dbvc/tree/master/dbvc-spring-boot-samples

Maven coordinates

<dependency>
    <groupId>com.hb0730</groupId>
    <artifactId>dbvc-parent</artifactId>
    <version>${dbvc-version}</version>
</dependency>

spring-boot project

<dependency>
    <groupId>com.hb0730</groupId>
    <artifactId>dbvc-spring-boot-starter</artifactId>
    <version>${dbvc-version}</version>
</dependency>

MAVEN

  • Install mvn clean install -Dpgp-skip -DskipTests
  • Deploy mvn clean deploy -P release -Dgpg.passphrase="passphrasem密码"