You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing jhipster jdl .\road-parking.jdl --incremental-changelog after changing entity UserExtended.phoneNumber from String to Integer. Everything works well but Change log of modifying column, modifyDataType tag , cannot be created automatically.
Motivation for or Use Case
Reproduce the error
orginal jdl
`
entity Role {
name String required maxlength(10)
type RoleType
isEnabled Boolean
}
enum RoleType{
ADMIN, USER, MANAGER
}
entity Permission {
name String
description String
url String
isEnabled Boolean
}
entity UserExtended{
phoneNumber String
sex Sex
}
enum Sex{
MALE, FEMALE, OTHER
}
relationship ManyToOne{
Role{permission} to Permission
}
relationship OneToOne{
UserExtended{user(login)} to User with builtInEntity
}
service all with serviceImpl
`
modified jdl
`
entity Role {
name String required maxlength(10)
type RoleType
isEnabled Boolean
}
enum RoleType{
ADMIN, USER, MANAGER
}
entity Permission {
name String
url String
isEnabled Boolean
}
entity UserExtended{
phoneNumber Integer
nickName String
sex Sex
}
entity Friend{
firstName String
lastName String
sex Sex
age Integer
}
enum Sex{
MALE, FEMALE, OTHER
}
relationship ManyToOne{
Role{permission} to Permission
Friend{UserExtended} to UserExtended
}
relationship OneToOne{
UserExtended{user(login)} to User with builtInEntity
}
`jhipster info
WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster.
If you want to execute the locally installed generator-jhipster, run: npx jhipster
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)
git version 2.45.1.windows.1
node: v20.13.1
npm: 10.5.2
Docker version 26.0.0, build 2ae903e
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity Friend {
firstName String
lastName String
sex Sex
age Integer
}
@ChangelogDate("20240607072345")
entity Role {
name String required maxlength(10)
type RoleType
isEnabled Boolean
}
@ChangelogDate("20240607072346")
entity Permission {
name String
url String
isEnabled Boolean
}
@ChangelogDate("20240607072347")
entity UserExtended {
phoneNumber Integer
nickName String
sex Sex
}
enum Sex {
MALE,
FEMALE,
OTHER
}
enum RoleType {
ADMIN,
USER,
MANAGER
}
relationship OneToOne {
UserExtended{user(login)} to User with builtInEntity
}
relationship ManyToOne {
Friend{userExtended} to UserExtended
Role{permission} to Permission
}
service Friend, Role, Permission, UserExtended with serviceImpl
search Role, Permission, UserExtended with no
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!`
JHipster configuration
Entity configuration(s) entityName.json files generated in the .jhipster directory
Only add/remove field is supported. Field rename and field attributes change are not supported.
There is no plan to support.
BTW, this following command cannot create modified column either: ./mvnw compile liquibase:diff
I consider if this feature should also be a basic feature for maintaining database. Field rename and field attributes change might be a high frequent behavior at development stage. I am not sure, but thanks so much.
mshima
changed the title
--incremental-changelog cannot create modifyDataType
Add support to modifyDataType for entity type changes
Jun 18, 2024
Overview of the issue
Executing
jhipster jdl .\road-parking.jdl --incremental-changelog
after changing entity UserExtended.phoneNumber from String to Integer. Everything works well but Change log of modifying column, modifyDataType tag , cannot be created automatically.Motivation for or Use Case
Reproduce the error
orginal jdl
`
entity Role {
name String required maxlength(10)
type RoleType
isEnabled Boolean
}
enum RoleType{
ADMIN, USER, MANAGER
}
entity Permission {
name String
description String
url String
isEnabled Boolean
}
entity UserExtended{
phoneNumber String
sex Sex
}
enum Sex{
MALE, FEMALE, OTHER
}
relationship ManyToOne{
Role{permission} to Permission
}
relationship OneToOne{
UserExtended{user(login)} to User with builtInEntity
}
service all with serviceImpl
`
modified jdl
`
entity Role {
name String required maxlength(10)
type RoleType
isEnabled Boolean
}
enum RoleType{
ADMIN, USER, MANAGER
}
entity Permission {
name String
url String
isEnabled Boolean
}
entity UserExtended{
phoneNumber Integer
nickName String
sex Sex
}
entity Friend{
firstName String
lastName String
sex Sex
age Integer
}
enum Sex{
MALE, FEMALE, OTHER
}
relationship ManyToOne{
Role{permission} to Permission
Friend{UserExtended} to UserExtended
}
relationship OneToOne{
UserExtended{user(login)} to User with builtInEntity
}
service all with serviceImpl
`
execute the following comand
jhipster jdl .\road-parking.jdl --incremental-changelog
Related issues
Suggest a Fix
JHipster Version(s)
`jhipster info
WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster.
If you want to execute the locally installed generator-jhipster, run: npx jhipster
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v8.5.0
Welcome to the JHipster Information Sub-Generator
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
Environment and Tools
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)
git version 2.45.1.windows.1
node: v20.13.1
npm: 10.5.2
Docker version 26.0.0, build 2ae903e
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!`
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryFriend.json
Permission.json
Role.json
UserExtended.json
Browsers and Operating System
The text was updated successfully, but these errors were encountered: