Generated Column with CURDATE()

One of the rules applied to generated columns is that the expression must use deterministic functions.

What is a deterministic function? Here’s a definition straight from the underlying database docs:

A function is deterministic if, given the same data in tables, multiple invocations produce the same result, independently of the connected user. Examples of functions that are nondeterministic and fail this definition: NOW(), CURRENT_DATE()

It is still possible to create a generated column as you describe it, however, instead of CURDATE() use the created or the update columns, for example:

WEEKDAY( created )

Regards,
Mark