How to reference new change in xml file

I just created a change by extending liquibase.change.AbstractChange and registering it by calling Right now the ChangeFactory is picking up all the metadata but the Xml parser is not letting me use any of that metadata.

You probably just need to make sure you have a namespace for your new change. If you don’t want to create you own xsd, you can use 

  1. http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd 

which is basically just “allow anything”.

A full header like:

  1. <databaseChangeLog
  2.         xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
  3.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.         xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
  5.         xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd
  6.         http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">

allows you to use your changeSet like:

  1.    
  2.        
  3.    

Nathan

This is exactly what I was looking for.

Can I also do something like

  1.        
  2.               blah blah blah
  3.        
  4.    

Or would I need to create my own xsd for that?

You should be able to have nested nodes in the xsd namespace. It is basically a “I accept whatever” xsd.

Nathan