0.1.1
=====
-- Clean up file write operations so that
+- [bug] Clean up file write operations so that
file handles are closed.
-- PyPy is supported.
+- [feature] PyPy is supported.
-- Python 2.5 is supported, needs
+- [feature] Python 2.5 is supported, needs
__future__.with_statement
+- [bug] Fix autogenerate so that "pass" is
+ generated between the two comments
+ if no net migrations were present.
+
0.1.0
=====
- Initial release. Status of features:
buf = []
for diff in diffs:
buf.append(_invoke_command("upgrade", diff, autogen_context))
+ if not buf:
+ buf = ["pass"]
return "\n".join(buf)
def _produce_downgrade_commands(diffs, autogen_context):
buf = []
for diff in diffs:
buf.append(_invoke_command("downgrade", diff, autogen_context))
+ if not buf:
+ buf = ["pass"]
return "\n".join(buf)
def _invoke_command(updown, args, autogen_context):
eq_(diffs[7][0][5], False)
-
+ def test_render_nothing(self):
+ context.configure(
+ connection = self.bind.connect(),
+ compare_type = True,
+ compare_server_default = True,
+ target_metadata=self.m1
+ )
+ template_args = {}
+ autogenerate.produce_migration_diffs(template_args, self.autogen_context)
+ eq_(re.sub(r"u'", "'", template_args['upgrades']),
+"""### commands auto generated by Alembic - please adjust! ###
+ pass
+ ### end Alembic commands ###""")
+ eq_(re.sub(r"u'", "'", template_args['downgrades']),
+"""### commands auto generated by Alembic - please adjust! ###
+ pass
+ ### end Alembic commands ###""")
def test_render_diffs(self):
"""test a full render including indentation"""