class Config(object):
- """Represent an Alembic configuration.
+ r"""Represent an Alembic configuration.
Within an ``env.py`` script, this is available
via the :attr:`.EnvironmentContext.config` attribute,
alembic_cfg.attributes['connection'] = connection
command.upgrade(alembic_cfg, "head")
- :param file_: name of the .ini file to open.
+ :param file\_: name of the .ini file to open.
:param ini_section: name of the main Alembic section within the
.ini file
:param output_buffer: optional file-like input buffer which
)
def inline_literal(self, value, type_=None):
- """Produce an 'inline literal' expression, suitable for
+ r"""Produce an 'inline literal' expression, suitable for
using in an INSERT, UPDATE, or DELETE statement.
When using Alembic in "offline" mode, CRUD operations
numerics should be supported. Other types like boolean,
dates, etc. may or may not be supported yet by various
backends.
- :param type_: optional - a :class:`sqlalchemy.types.TypeEngine`
+ :param type\_: optional - a :class:`sqlalchemy.types.TypeEngine`
subclass stating the type of this value. In SQLAlchemy
expressions, this is usually derived automatically
from the Python type of the value itself, as well as
def drop_constraint(
cls, operations, constraint_name, table_name, type_=None, schema=None
):
- """Drop a constraint of the given name, typically via DROP CONSTRAINT.
+ r"""Drop a constraint of the given name, typically via DROP CONSTRAINT.
:param constraint_name: name of the constraint.
:param table_name: table name.
- :param type_: optional, required on MySQL. can be
+ :param type\_: optional, required on MySQL. can be
'foreignkey', 'primary', 'unique', or 'check'.
:param schema: Optional schema name to operate within. To control
quoting of the schema outside of the default behavior, use
schema=None,
**kw
):
- """Issue an "alter column" instruction using the
+ r"""Issue an "alter column" instruction using the
current migration context.
Generally, only that aspect of the column which
:param new_column_name: Optional; specify a string name here to
indicate the new name within a column rename operation.
- :param type_: Optional; a :class:`~sqlalchemy.types.TypeEngine`
+ :param type\_: Optional; a :class:`~sqlalchemy.types.TypeEngine`
type object to specify a change to the column's type.
For SQLAlchemy types that also indicate a constraint (i.e.
:class:`~sqlalchemy.types.Boolean`, :class:`~sqlalchemy.types.Enum`),