Closed flyliu33 closed 4 weeks ago
You have incrementalChangelog
enabled which generates new changelogs on jdl changes.
You can disable using --no-incremental-changelog
.
Thanks for correct, but jhipster jdl order.jdl
still will generate the drop id changelog after modifying order.jdl
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-latest.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<!--
Dropped columns to the entity Company.
-->
<changeSet id="20241023090337-1-drop-columns" author="jhipster">
<dropColumn tableName="company">
<column name="id"/>
</dropColumn>
</changeSet>
<!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here -->
</databaseChangeLog>
dropColumn
will only be generated if incremental changelog is enabled.
Please check if
"incrementalChangelog": true,
Has changed to false in your .yo-rc.json.
Closing since reproduction steps are missing the original jdl and the modified jdl.
Overview of the issue
jhipster jdl ..\order\src\main\jdl\order.jdl
would drop id column of tablesno error threw
Motivation for or Use Case
I try to use command
jhipster jdl ..\order\src\main\jdl\order.jdl
for generating liquibase. but it will create dropid
changelog after modifying my jdl files. so I prefer to usejhipster jdl ..\order\src\main\jdl\order.jdl --skip-db-changelog
for generating backend code and then using./mvnw compile liquibase:diff
for generating liquibase changelog, though it doesn't seem more reasonable.Reproduce the error
jhipster jdl
jhipster jdl
Related issues
Suggest a Fix
JHipster Version(s)
8.7.1
JHipster configuration
To provide all information we need, you should run
jhipster info
in the project root folder (or workspaces root for microservices), and copy/paste the result here.jhipster info
removes sentitive information like rememberKey, jwtSecretKey. Double check if there is any other sensitive info.As alternative you can add a JDL wrapped in below structure
.yo-rc.json file
Environment and Tools
openjdk version "17.0.12" 2024-07-16 LTS OpenJDK Runtime Environment Corretto-17.0.12.7.1 (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.12.7.1 (build 17.0.12+7-LTS, mixed mode, sharing)
git version 2.45.1.windows.1
node: v20.17.0 npm: 10.8.2
Docker version 27.1.1, build 6312585
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
The information is mandatory for bug reports. This will allow us to use automated tests and genarate the broken sample using
jhipster from-issue
command.Browsers and Operating System
Edition Windows 11 Pro Version 23H2 Installed on 8/19/2024 OS build 22631.4317 Experience Windows Feature Experience Pack 1000.22700.1041.0