So, I create 2 new classes that extend AddColumnChange and AddColumnGenerator
Do I need to do something with priority or does liquibase automatically pick up know to use those instead?
I was going to create AddColumnOrderedChange that extends AddColumnChange and simples add a property called afterColumn that will be a String.
Also will create a AddColumnAfterGenerator and overrride generateSql to add the “AFTER” for those databses that support it.
Both of these will need to go into a liquibase.ext package?
Also, we are using the grails-database-migration plugin which uses a groovy DSL for the changelogs.
https://github.com/grails-plugins/grails-database-migration/blob/master/src/groovy/grails/plugin/databasemigration/DslBuilder.groovy
I assume that it will just pick up the new attribute property and set them to my new AddColumnOrderedChange class?
my thought was something like
<column name=“name” type=“varchar(50)” />
which in the builder would be
addColumn(tableName:“products”,afterColumn:"id){
column(name:“name”, type:“varchar(50)”)
}
-
Learn
-
Resources
-
Free Tools
OSS Risk Scanner Database DevOps Risk AssessmentCheat Sheets
Snowflake + Liquibase Databricks + Liquibase -
eBooks
6 Liquibase Community Risks & How to Avoid Guide: SOC 2 Compliance at the Database Layer Guide: Quantify the Value of Liquibase Secure -
Comparison Guides
Liquibase vs. Flyway Liquibase vs. Bytebase Liquibase Community vs Liquibase Secure
-
- Quickstart
- Get Started
- Documentation
- University
-
Resources
- Connect
- Contribute
- Join
- Blog