I'd like to ensure that the value of a column may change in a defined way only. Examples are columns containing a state value which must only change according to defined state transitions) or columns which may be set from NULL to something only once.
I'd like to avoid implementing these checks on the application layer.
I could not find a solution using regular constraints. Is there another approach to accomplish that or are constraints like this intentionally not supported on the database layer?