summaryrefslogtreecommitdiff
path: root/test/dialect/mysql.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2008-05-14 19:49:40 +0000
committerJason Kirtland <jek@discorporate.us>2008-05-14 19:49:40 +0000
commit65f4f02ec8de1459f852412766b5f469b15839b6 (patch)
tree20b6b281ce47a22a2cd7749ddf3775c27051f511 /test/dialect/mysql.py
parenta52a8dd8768509589d7a3310778e104a4a318a33 (diff)
downloadsqlalchemy-65f4f02ec8de1459f852412766b5f469b15839b6.tar.gz
Columns now have default= and server_default=. PassiveDefault fades away.
Diffstat (limited to 'test/dialect/mysql.py')
-rw-r--r--test/dialect/mysql.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/dialect/mysql.py b/test/dialect/mysql.py
index bdcdf1800..f5719ecb1 100644
--- a/test/dialect/mysql.py
+++ b/test/dialect/mysql.py
@@ -394,18 +394,18 @@ class TypesTest(TestBase, AssertsExecutionResults):
([mysql.MSTimeStamp],
'TIMESTAMP'),
([mysql.MSTimeStamp,
- PassiveDefault(sql.text('CURRENT_TIMESTAMP'))],
+ DefaultClause(sql.text('CURRENT_TIMESTAMP'))],
"TIMESTAMP DEFAULT CURRENT_TIMESTAMP"),
([mysql.MSTimeStamp,
- PassiveDefault(sql.text("'1999-09-09 09:09:09'"))],
+ DefaultClause(sql.text("'1999-09-09 09:09:09'"))],
"TIMESTAMP DEFAULT '1999-09-09 09:09:09'"),
([mysql.MSTimeStamp,
- PassiveDefault(sql.text("'1999-09-09 09:09:09' "
+ DefaultClause(sql.text("'1999-09-09 09:09:09' "
"ON UPDATE CURRENT_TIMESTAMP"))],
"TIMESTAMP DEFAULT '1999-09-09 09:09:09' "
"ON UPDATE CURRENT_TIMESTAMP"),
([mysql.MSTimeStamp,
- PassiveDefault(sql.text("CURRENT_TIMESTAMP "
+ DefaultClause(sql.text("CURRENT_TIMESTAMP "
"ON UPDATE CURRENT_TIMESTAMP"))],
"TIMESTAMP DEFAULT CURRENT_TIMESTAMP "
"ON UPDATE CURRENT_TIMESTAMP"),
@@ -611,18 +611,18 @@ class TypesTest(TestBase, AssertsExecutionResults):
"""Test reflection of column defaults."""
def_table = Table('mysql_def', MetaData(testing.db),
- Column('c1', String(10), PassiveDefault('')),
- Column('c2', String(10), PassiveDefault('0')),
- Column('c3', String(10), PassiveDefault('abc')))
+ Column('c1', String(10), DefaultClause('')),
+ Column('c2', String(10), DefaultClause('0')),
+ Column('c3', String(10), DefaultClause('abc')))
try:
def_table.create()
reflected = Table('mysql_def', MetaData(testing.db),
autoload=True)
for t in def_table, reflected:
- assert t.c.c1.default.arg == ''
- assert t.c.c2.default.arg == '0'
- assert t.c.c3.default.arg == 'abc'
+ assert t.c.c1.server_default.arg == ''
+ assert t.c.c2.server_default.arg == '0'
+ assert t.c.c3.server_default.arg == 'abc'
finally:
def_table.drop()
@@ -697,39 +697,39 @@ class TypesTest(TestBase, AssertsExecutionResults):
try:
Table('ai_1', meta,
Column('int_y', Integer, primary_key=True),
- Column('int_n', Integer, PassiveDefault('0'),
+ Column('int_n', Integer, DefaultClause('0'),
primary_key=True))
Table('ai_2', meta,
Column('int_y', Integer, primary_key=True),
- Column('int_n', Integer, PassiveDefault('0'),
+ Column('int_n', Integer, DefaultClause('0'),
primary_key=True))
Table('ai_3', meta,
- Column('int_n', Integer, PassiveDefault('0'),
+ Column('int_n', Integer, DefaultClause('0'),
primary_key=True, autoincrement=False),
Column('int_y', Integer, primary_key=True))
Table('ai_4', meta,
- Column('int_n', Integer, PassiveDefault('0'),
+ Column('int_n', Integer, DefaultClause('0'),
primary_key=True, autoincrement=False),
- Column('int_n2', Integer, PassiveDefault('0'),
+ Column('int_n2', Integer, DefaultClause('0'),
primary_key=True, autoincrement=False))
Table('ai_5', meta,
Column('int_y', Integer, primary_key=True),
- Column('int_n', Integer, PassiveDefault('0'),
+ Column('int_n', Integer, DefaultClause('0'),
primary_key=True, autoincrement=False))
Table('ai_6', meta,
- Column('o1', String(1), PassiveDefault('x'),
+ Column('o1', String(1), DefaultClause('x'),
primary_key=True),
Column('int_y', Integer, primary_key=True))
Table('ai_7', meta,
- Column('o1', String(1), PassiveDefault('x'),
+ Column('o1', String(1), DefaultClause('x'),
primary_key=True),
- Column('o2', String(1), PassiveDefault('x'),
+ Column('o2', String(1), DefaultClause('x'),
primary_key=True),
Column('int_y', Integer, primary_key=True))
Table('ai_8', meta,
- Column('o1', String(1), PassiveDefault('x'),
+ Column('o1', String(1), DefaultClause('x'),
primary_key=True),
- Column('o2', String(1), PassiveDefault('x'),
+ Column('o2', String(1), DefaultClause('x'),
primary_key=True))
meta.create_all()