dialect_name=None,
transactional_ddl=None,
output_buffer=None,
- output_encoding=None,
starting_rev=None,
tag=None,
template_args=None,
is present in the alembic.ini file. New in 0.3.3.
:param version_table: The name of the Alembic version table.
The default is ``'alembic_version'``.
+ :param version_table_schema: Optional schema to place version
+ table within.
+
+ .. versionadded:: 0.5.0
Parameters specific to the autogenerate feature, when
``alembic revision`` is run with the ``--autogenerate`` feature:
opts["output_buffer"] = output_buffer
elif self.config.output_buffer is not None:
opts["output_buffer"] = self.config.output_buffer
- if output_encoding is not None:
- opts["output_encoding"] = output_encoding
if starting_rev:
opts['starting_rev'] = starting_rev
if tag:
self.dialect = dialect
self.script = opts.get('script')
- as_sql=opts.get('as_sql', False)
- transactional_ddl=opts.get("transactional_ddl")
+ as_sql = opts.get('as_sql', False)
+ transactional_ddl = opts.get("transactional_ddl")
if as_sql:
self.connection = self._stdout_connection(connection)
.. changelog::
:version: 0.5.0
+ .. change::
+ :tags: feature
+ :tickets: 76
+ :pullreq: 24
+
+ Added ``version_table_schema`` argument
+ to :meth:`.EnvironmentContext.configure`,
+ complements the ``version_table`` argument to
+ set an optional remote schema for the version
+ table. Courtesy Christian Blume.
+
.. change::
:tags: bug, postgresql
:tickets: 32
opts={'version_table': 'explicit'})
self.assertEqual(context._version.name, 'explicit')
+ def test_config_explicit_version_table_schema(self):
+ context = self.make_one(dialect_name='sqlite',
+ opts={'version_table_schema': 'explicit'})
+ self.assertEqual(context._version.schema, 'explicit')
+
def test_get_current_revision_creates_version_table(self):
context = self.make_one(connection=self.connection,
opts={'version_table': 'version_table'})