didn't work if the server_default was a generated
SQL expression. Courtesy Moriyoshi Koizumi.
+- [feature] Added support for alteration of MySQL
+ columns that have AUTO_INCREMENT, as well as enabling
+ this flag. Courtesy Moriyoshi Koizumi.
+
0.3.6
=====
- [feature] Added include_symbol option to
compiler.dialect.type_compiler.process(type_),
"NULL" if nullable else "NOT NULL"
)
- if autoincrement is not None:
+ if autoincrement:
spec += " AUTO_INCREMENT"
if server_default != False:
spec += " DEFAULT %s" % _render_value(compiler, server_default)
'ALTER TABLE t1 CHANGE c1 c2 INTEGER NULL AUTO_INCREMENT'
)
+def test_col_remove_autoincrement():
+ context = op_fixture('mysql')
+ op.alter_column('t1', 'c1', name="c2", existing_type=Integer,
+ existing_autoincrement=True,
+ autoincrement=False)
+ context.assert_(
+ 'ALTER TABLE t1 CHANGE c1 c2 INTEGER NULL'
+ )
+
def test_col_nullable():
context = op_fixture('mysql')
op.alter_column('t1', 'c1', nullable=False, existing_type=Integer)