Liquibase unable to change type of column

As liquibase has it’s secrets how it wants to work, by default I disable it.

Now I have a MultiPolygon field where I cannot enter more then 255 characters …

So I enable Liquibase
image

I am searching all liquibase files, to find the text conGuidContact → nothing found

In application.properties I add
logging.level.liquibase=DEBUG

I cannot find any log file (nor any console)

I create the file /src/main/resources/logback.xml

<configuration>
	<appender name="FILE" class="ch.qos.logback.core.FileAppender">
		<file>logs/liquibase-debug.log</file>
		<encoder>
			<pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n</pattern>
		</encoder>
	</appender>

	<logger name="liquibase" level="DEBUG">
		<appender-ref ref="FILE" />
	</logger>

	<root level="INFO">
		<appender-ref ref="FILE" />
	</root>
</configuration>

Still no information as there is no file created.

It seems, Liquibase has a problem to create the XML File. Where do I find the information, what liquibase is not able to change ??

Regards

Felix

Hi

Sorry for the delayed response.

We have checked the case and found that this “Unable to change type of column…” error is thrown if the entity which contains modified attribute has “Create Only” DDL generation mode (@DdlGeneration(value = DdlGeneration.DbScriptGenerationMode.CREATE_ONLY) annotation on the entity class) and DROP changeset generated to change column type. Due to CREATE_ONLY restriction, DROP changset is not allowed and can’t be generated. So you need to change DbScriptGenerationMode to CREATE_AND_DROP.

I agree that the error message is not explanatory at all. We will check and improve error messages for this and similar cases.

Regarding the Liquibase logs.
For the Liquibase diff generation process performed by Jmix Studio the error logs can be found in IntelliJ IDEA log file, idea.log. But for the case above, there would be nothing helpful in this log for the user.

logging.level.liquibase=DEBUG property affects logging level of Liquibase update process, not diff generation. You can see it in the console output of “Liquibase Update” tab or Jmix Application run configuration console output.

1 Like

Hi @gaslov

This is really tricky and it is good that now we have it at least a little bit documented.

Best regards
Felix