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
I just tried the Blueprint on an existing database where there are already plenty of lines inside the database tables. The Blueprint adds for each of the Audit Fields NOT NULL constraints. This does not work for existing tables with data as adding the constraint will cause such an error during startup while applying the generated liquibase changesets as there is no column default on the two user columns, therefore the newly created columns contain solely NULL values.
Data truncation: Invalid use of NULL value [Failed SQL: (1138) ALTER TABLE fx.my_data MODIFY created_by VARCHAR(50) NOT NULL]
Maybe, we could introduce a default value (system (?) - just like the fallback during runtime) for the created_by / last_modified_by columns which can immediately be dropped after initial creation of the columns, just as with the two date columns...
Alternatively, at least state this behaviour regarding Constraints clearer in the README, by maybe adjusting this sentence:
This will also add new columns to the entities, so it is ideal to recreate the tables if you are enabling this for existing entities or use incremental changelog.
The text was updated successfully, but these errors were encountered:
Hi,
I just tried the Blueprint on an existing database where there are already plenty of lines inside the database tables. The Blueprint adds for each of the Audit Fields
NOT NULL
constraints. This does not work for existing tables with data as adding the constraint will cause such an error during startup while applying the generated liquibase changesets as there is no column default on the two user columns, therefore the newly created columns contain solelyNULL
values.Maybe, we could introduce a default value (system (?) - just like the fallback during runtime) for the created_by / last_modified_by columns which can immediately be dropped after initial creation of the columns, just as with the two date columns...
Alternatively, at least state this behaviour regarding Constraints clearer in the README, by maybe adjusting this sentence:
The text was updated successfully, but these errors were encountered: