Repository navigation
Conversation
mshima
force-pushed
the
incremental-changelog
branch
from
October 25, 2026 18:10
264540c to
ad9e2c9
Compare
…, like the incremental changelogs of Liquibase With incrementalChangelog, the migrations of the entities are the ones of their changelogs JHipster records in the objects of the .yo-rc.json (getEntityChangelogs, generator-jhipster at 6a856064 of jhipster/generator-jhipster#35746). A creation gives AddedEntity and AddedEntityConstraints, kept once written. An update gives UpdatedEntity at the date of its changelog plus 6000000000000, after the constraints of every entity, adding the columns of the added fields and dropping the ones of the removed fields, then UpdatedEntityConstraints 1 ms after, adding and dropping the join columns, their foreign keys and the join tables of the relationships. A generation writes the migrations of its own changelogs and registers every one in orm.config.ts, without reading the folder of the migrations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nerator-jhipster at e3655959 The changelogs of this generation are the ones isNewEntityChangelog of JHipster gives, the creations of the entities a project without changelogs already has left out, and a creation is dated by the changelogDate of its entity: the mirrors of the blueprint (formerChangelogs, createdChangelogDate) are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…only, generator-jhipster at ed4a0804 getEntityChangelogs of JHipster records the changelogs whatever incrementalChangelog: the blueprint asks for them with incrementalChangelog only, so a generation without it records no changelog in the .yo-rc.json. The changelogs custom object, which no task of the blueprint used, is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mshima
force-pushed
the
incremental-changelog
branch
from
October 25, 2026 18:57
aba547f to
c61c075
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
incrementalChangelog, the server now migrates the changes of the entities like the incremental Liquibase changelogs of JHipster Spring Boot. Before, a regeneration rewrote theAddedEntitymigration of a changed entity. A database that had run it did not run it again, so a new field or relationship was missing at runtime: dev and prod runmigrationsRunwithoutsynchronize.Depends on jhipster/generator-jhipster#35746: generator-jhipster is pinned to its commit
ed4a0804, which adds the changelogs of the entities (generator-jhipster/generators/base-entity-changes/generators/changelogs/support). The pin has to move to a jhipster/generator-jhipster commit once that PR is merged.The migrations of an entity are the ones of its changelogs, which JHipster records as objects in the
.yo-rc.json, one for each change of an entity, compared to the entity of its last changelog:AddedEntity<Entity>and, when the entity has join columns or join tables,AddedEntityConstraints<Entity>, like theadded_entitychangelogs;UpdatedEntity<Entity>, at the date of the changelog plus 6000000000000, so it runs after every constraints migration, like the incremental section ofmaster.xml. It adds the columns of the added fields and drops the ones of the removed fields, likeupdated_entity;UpdatedEntityConstraints<Entity>, 1 ms later. It drops the join columns, their foreign keys and the join tables of the removed relationships, then adds the ones of the added relationships, likeupdated_entity_constraints.A generation writes the migrations of its own changelogs and keeps the others, registering every one in
orm.config.tswithout reading the folder of the migrations. A generation of the project configuration alone, withoutsrc/migrations, therefore gives the same migrations as the cli. In a project without changelogs, JHipster first records the creations of the entities from their.jhipsterfiles on the disk; those count as former changelogs, their migrations already written.What an update migrates:
prepareField), the blob types of the entity files, the join table names (getJoinTableName), and the owner side.onDeleteoronUpdate: left alone, since the foreign keys of the server don't declare them.migrations/support/schema.tsgetsaddColumnsanddropColumns, which skip the columns the database already has or no longer has, likecreateTable. The unique columns ofcreateTableare shared withaddColumns. WithoutincrementalChangelog, a generation is unchanged except for the README of the server, which now describes both modes.Verified:
incrementalChangelog: fields added and removed, a blob removed, relationships added and removed, the other side of a removed relationship, a new entity. The changelogs recorded and the dates of the migrations are checked.typeorm:schema:logreports the schema up to date.src/migrations, gives the same migrations.generate_samplesauto, base main): only the README of the server andmigrations/support/schema.tschange, nothing in the MongoDB ones.🤖 Generated with Claude Code