summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/mysql.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r--lib/sqlalchemy/databases/mysql.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py
index 0f40569b1..c4e6bf31f 100644
--- a/lib/sqlalchemy/databases/mysql.py
+++ b/lib/sqlalchemy/databases/mysql.py
@@ -671,19 +671,18 @@ class MSTimeStamp(sqltypes.TIMESTAMP):
"""MySQL TIMESTAMP type.
To signal the orm to automatically re-select modified rows to retrieve
- the updated timestamp, add a PassiveDefault to your column specification::
+ the updated timestamp, add a DefaultClause to your column specification::
from sqlalchemy.databases import mysql
Column('updated', mysql.MSTimeStamp,
- PassiveDefault(sql.text('CURRENT_TIMESTAMP')))
+ server_default=sql.text('CURRENT_TIMESTAMP'))
The full range of MySQL 4.1+ TIMESTAMP defaults can be specified in
- the PassiveDefault::
+ the the default:
- PassiveDefault(sql.text('CURRENT TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'))
+ server_default=sql.text('CURRENT TIMESTAMP ON UPDATE CURRENT_TIMESTAMP')
"""
-
def get_col_spec(self):
return "TIMESTAMP"
@@ -2228,7 +2227,7 @@ class MySQLSchemaReflector(object):
default = sql.text(default)
else:
default = default[1:-1]
- col_args.append(schema.PassiveDefault(default))
+ col_args.append(schema.DefaultClause(default))
table.append_column(schema.Column(name, type_instance,
*col_args, **col_kw))