ワンクリックで
jmix-create-liquibase-changelog
Create Liquibase changelogs that exactly match Jmix entity model changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create Liquibase changelogs that exactly match Jmix entity model changes.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Open a Jmix entity detail view from a button/action and refresh related data after save.
Add Jmix entity lifecycle event listeners to perform additional actions with saved or loaded entities.
Add complete Jmix message keys for entities, enums, views, actions, and validation text.
Configure or audit Jmix fetch plans in XML views, fragments, DataManager loads, repositories, and entity events when loading references, avoiding N+1 queries, fixing unfetched attribute errors, or tuning data loading.
Add inline editable parent-child composition UI to a Jmix detail view, when a parent entity owns child records edited via a property-bound collection container (no query loader).
Create a Jmix Flow UI detail view with XML descriptor, save-close action, messages, and policies.
| name | jmix-create-liquibase-changelog |
| description | Create Liquibase changelogs that exactly match Jmix entity model changes. |
Use this skill for every persistent entity or schema change.
application.properties.changelog.xml: usually by placing it under the directory covered by the project's <includeAll>, or by adding an explicit <include> only when the project uses explicit includes.ID and VERSION columns for standard Jmix entities.| Java type | Liquibase type |
|---|---|
| UUID | ${uuid.type} |
| String | varchar(n) |
| Integer | int |
| Long | bigint |
| BigDecimal | decimal(p,s) |
| Boolean | boolean |
| LocalDate | date |
| LocalDateTime | timestamp |
| Enum id string | varchar(50) |
<changeSet id="create-customer" author="app">
<createTable tableName="CUSTOMER">
<column name="ID" type="${uuid.type}">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_CUSTOMER"/>
</column>
<column name="VERSION" type="int">
<constraints nullable="false"/>
</column>
<column name="NAME" type="varchar(100)">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>
If the entity carries audit (@CreatedBy / @CreatedDate / @LastModifiedBy /
@LastModifiedDate) or soft-delete (@DeletedBy / @DeletedDate) annotations,
add the matching columns INSIDE its <createTable>. They are set by Jmix at
runtime, so keep them NULLABLE (no nullable="false"). Add only the columns
whose annotations are actually on the entity — see jmix-create-entity
(Auditing and Soft Delete).
<column name="CREATED_BY" type="varchar(255)"/>
<column name="CREATED_DATE" type="timestamp"/>
<column name="LAST_MODIFIED_BY" type="varchar(255)"/>
<column name="LAST_MODIFIED_DATE" type="timestamp"/>
<column name="DELETED_BY" type="varchar(255)"/>
<column name="DELETED_DATE" type="timestamp"/>
When a child table has a foreign key to a parent, the parent createTable
MUST come BEFORE the child's createTable / addForeignKeyConstraint. A
changeSet that references a table not yet created fails at startup and takes
down the whole context — including tests that only touch the data model.
Order the parent first, the child (with its FK) second:
<!-- parent FIRST -->
<changeSet id="create-parent" author="app">
<createTable tableName="PARENT">
<column name="ID" type="${uuid.type}">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_PARENT"/>
</column>
<column name="VERSION" type="int"><constraints nullable="false"/></column>
<column name="NAME" type="varchar(100)"><constraints nullable="false"/></column>
</createTable>
</changeSet>
<!-- child SECOND: its FK references the already-created parent -->
<changeSet id="create-child" author="app">
<createTable tableName="CHILD">
<column name="ID" type="${uuid.type}">
<constraints nullable="false" primaryKey="true" primaryKeyName="PK_CHILD"/>
</column>
<column name="VERSION" type="int"><constraints nullable="false"/></column>
<column name="NAME" type="varchar(100)"><constraints nullable="false"/></column>
<column name="PARENT_ID" type="${uuid.type}"><constraints nullable="false"/></column>
</createTable>
<addForeignKeyConstraint baseTableName="CHILD" baseColumnNames="PARENT_ID"
referencedTableName="PARENT" referencedColumnNames="ID"
constraintName="FK_CHILD_ON_PARENT"/>
</changeSet>
For a composition child, the delete cascade is enforced by Jmix at the
application layer (@Composition + @OnDelete(DeletePolicy.CASCADE) on the
entity), NOT by the database — Jmix uses soft delete by default, so a DB-level
onDelete="CASCADE" would never fire. Leave the FK without onDelete unless
you specifically need hard-delete DB-level enforcement.
<includeAll path="/com/company/app/liquibase/changelog"/>
If the project uses explicit includes instead of includeAll, follow that existing style:
<include file="/com/company/app/liquibase/changelog/030-customer.xml"/>
UUID type instead of ${uuid.type}.${datetime.type} when the project does not define them.VERSION.