Add optional MySQL-style ON UPDATE to columns #959
Merged
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.
An implementation of feature request #219.
This feature is available in all modes because in may be useful in default mode to.
CREATE TABLE
andALTER TABLE ADD COLUMN
syntax is the same as in MySQL.ALTER TABLE ALTER COLUMN
syntax for changing existing columns is not compatible with MySQL, because in MySQL such parameters cannot be changed in regular way,CHANGE
should be used instead, but H2 don't have this MySQL extension.This implementation is not limited to date-time columns and
CURRENT_TIMESTAMP
function, any column and any expression can be used, just like inDEFAULT
.If update statement does not change any values in a row
ON UPDATE
column does not change its value, like in MySQL. Explicit value for this column can be specified to prevent execution ofON UPDATE
expression also like in MySQL.Non-standard
INFORMATION_SCHEMA.COLUMNS.COLUMN_ON_UPDATE
field is introduced. (COLUMN_DEFAULT
was already here, so name forON UPDATE
follows this name convention).Documentation is updated.
Minor issues with building of documentation are also fixed.