diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-06-29 14:35:22 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-06-29 14:57:31 -0400 |
commit | a2c2dcaf082ecf97c7e06cd23adf5a614b5a4a2b (patch) | |
tree | b01c2bdc18338ed47263d941f089db5d5181ef97 /lib/sqlalchemy/sql/schema.py | |
parent | 5f5b56d646f154ee572c9de80449423304103bad (diff) | |
download | sqlalchemy-a2c2dcaf082ecf97c7e06cd23adf5a614b5a4a2b.tar.gz |
Docuemnt current workarounds for MySQL TIMESTAMP
MySQL 8 no longer generates the DEFAULT or ON UPDATE
clauses for TIMESTAMP by default, hence users will begin to hit
this regularly. add warnings that this non-standard SQL is not
accommodated by server_onupdate and docuemnt the workaround
used in issues such as #4652.
Fixes: #5427
Change-Id: Ie048dcc91c648dd0b80ed395208c1d665b6c968b
Diffstat (limited to 'lib/sqlalchemy/sql/schema.py')
-rw-r--r-- | lib/sqlalchemy/sql/schema.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 3df1c9f91..a3f67fc68 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -1259,6 +1259,12 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause): implement any kind of generation function within the database, which instead must be specified separately. + + .. warning:: This directive **does not** currently produce MySQL's + "ON UPDATE CURRENT_TIMESTAMP()" clause. See + :ref:`mysql_timestamp_onupdate` for background on how to + produce this clause. + .. seealso:: :ref:`triggered_columns` |