LIQUIBASE
LIQUIBASE
com
INSTALACIÓN
LINUX MINT
Instalar java
Descargar liquibase
https://www.liquibase.com/download
ejecutar:
nano ~/.bashrc
export PATH=$PATH:<ruta_a_liquibase>
quedando
export PATH=$PATH:/home/ususario/carpeta_liquibase
liquibase --version
migraciones/
liquibase.properties
changelog.xml
changelogs/
changelog-1.0.xml
changelog-1.1.xml
CONFIGURACIÓN XML
Configurar liquibase.properties
Generar changelog.xml
liquibase generateChangeLog
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:pro="http://www.liquibase.org/xml/ns/pro"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd
http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd
">
</databaseChangeLog>
COMANDOS
Actualizar cambios
liquibase update
SINTAXIS DE NOMBRE DEL ARCHIVO
yymmdd.version_NroHistoriaUsuario.sql
240501.0_US001.sql
240501.1_US001.sql
--changeset andres:240501.0_US001