Support adding computed=true columns with no type set #2340
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.
Description
Fixes #2283 by only requiring
type
when computed is false or not set.Dev Handoff Notes (Internal Use)
Links
Testing
Dev Verification
Tested the following changesets:
including taking "type" off addColumn on id=4 to make sure that was still flagged as required when computed was not set
Manual testing
Setup
Use next changelog:
Execute
liquibase update --changelog-file changelog.xml --labels setup
Text cases
Verify update is successful for computed=true columns when there is no type attribute.
liquibase update --changelog-file changelog.xml --labels fix,test
value_id
is created fortest_table1
test_table2
is created with computed columnvalue_id
Verify update throws an error when type attribute is missing for not computed column.
liquibase update --changelog-file changelog.xml --labels addError
columnType is required
error is shownliquibase update --changelog-file changelog.xml --labels createError
column 'type' is required for all columns
error message is shown┆Issue is synchronized with this Jira Bug by Unito