In liquibase, "author" is normally hardcoded in the changeset. But we want to set it to the db user against which the changeset is being run. So we will have the author dev_schema
in dev, and prod_schema
in prod and so on. The db user are not known beforehand, so we like to set at runtime automatically from --username option of liquibase connection string.
./liquibase.bat --driver=oracle.jdbc.OracleDriver --changeLogFile="changelog.xml" --url="jdbc:oracle:thin:@localhost:1521:xe" --username=dev_schema ...
In the changeset tag I set the attribute author to ${username}
but it is not picked up.
<changeSet author="${username}" ...
Also tried setting the environment variable, which worked, but then you have to set the same username twice. There is also a risk that if someone uses a different username, liquibase will fail to execute due to checksum failure.
Is that possible? Alternatively, any way around?
Change
and then modify it yourself... - Jens