Liquibase-core - dbDoc fails generating of documents #1088
Labels
DBOracle
good first issue
This issue is an easy starter project for new contributors.
hacktoberfest
a month-long celebration of open-source software and Developers contribute by completing PRs
ImpactLow
Reproduced
Severity3
sprint2022-37
sprint2022-38
TypeBug
Prerequisites:
driver=oracle.jdbc.driver.OracleDriver
changeLogFile=test_changelog.xml
username=liquibase_user
password=root
url=jdbc:oracle:thin:@localhost:1521:ORCL
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
<changeSet runAlways="true" author="testuser" id="3">
<sql>CREATE INDEX TEST_INDEX ON PERSON (CASE WHEN (FIRST_NAME IS NOT NULL AND (FIRST_NAME='1' OR FIRST_NAME='2' OR FIRST_NAME='3' OR FIRST_NAME='4' OR FIRST_NAME='5'
OR FIRST_NAME='6' OR FIRST_NAME='7' OR FIRST_NAME='8' OR FIRST_NAME='9' OR FIRST_NAME='10' OR FIRST_NAME='11'
OR FIRST_NAME='12' OR FIRST_NAME='13' OR FIRST_NAME='14' OR FIRST_NAME='15' OR FIRST_NAME='16' OR FIRST_NAME='17' OR FIRST_NAME='18')) THEN 1 ELSE 0 END)</sql>
</changeSet>
</databaseChangeLog>
Steps to reproduce:
java -jar liquibase-core-3.5.5.jar --driver=oracle.jdbc.driver.OracleDriver --classpath=<path_to_jdbc_driver> --changeLogFile=<path_to_test_changelog.xml> --url="jdbc:oracle:thin:@localhost:1521:ORCL" --username=<user_name> --password=<password> update
java -jar liquibase-core-3.5.5.jar --driver=oracle.jdbc.driver.OracleDriver --classpath=<path_to_jdbc_driver> --changeLogFile=<path_to_test_changelog.xml> --url="jdbc:oracle:thin:@localhost:1521:ORCL" --username=<user_name> --password=<password> dbDoc folder_to_out_docs
Expected result: dbDoc generates html files for each table column as well as other attributes.
Actual result:
Unexpected error running Liquibase: dbDoc_out\columns\liquibase_user.person.case__when___first_name__is_not_null_and___first_name___1__or__first_name___2__or__first_name___3__or__first_name___4__or__first_name___5__or__first_name___6__or__first_name___7__or__first_name___8__or__first_name___9__or__first_name___10__or__first_name___11__or__first_name___12__or__first_name___13__or__first_name___14__or__first_name___15__or__first_name___16__or__first_name___17__or__first_name___18____then_1_else_0_end.html (The filename, directory name, or volume label syntax is incorrect).
RCA:
The reason of this error is dbDoc tries to create html doc with index body in filename for table column folder. As we can see the index body is too long and file system doesn't allow to create files with such too long file name(255 characters constraint). So, from my perspective, dbDoc identifies index body as column and generates doc for it.
Please fix it.
The text was updated successfully, but these errors were encountered: