# Path: alembic/util.py
# class CommandError(Exception):
# class memoized_property(object):
# class immutabledict(dict):
# def _safe_int(value):
# def requires_07(feature):
# def template_to_file(template_file, dest, **kw):
# def create_module_class_proxy(cls, globals_, locals_):
#     def _install_proxy(obj):
#     def _remove_proxy():
#     def _create_op_proxy(name):
#         def _name_error(name):
# def coerce_resource_to_filename(fname):
# def status(_statmsg, fn, *arg, **kw):
# def err(message):
# def obfuscate_url_pw(u):
# def asbool(value):
# def warn(msg):
# def msg(msg, newline=True):
# def load_python_file(dir_, filename):
# def pyc_file_from_path(path):
# def rev_id():
#     def __init__(self, fget, doc=None):
#     def __get__(self, obj, cls):
#     def _immutable(self, *arg, **kw):
#     def __new__(cls, *args):
#     def __init__(self, *args):
#     def __reduce__(self):
#     def union(self, d):
#     def __repr__(self):
# 
# Path: alembic/ddl/impl.py
# class ImplMeta(type):
# class DefaultImpl(object):
# class _literal_bindparam(_BindParamClause):
#     def __init__(cls, classname, bases, dict_):
#     def __init__(self, dialect, connection, as_sql,
#                     transactional_ddl, output_buffer,
#                     context_opts):
#     def get_by_dialect(cls, dialect):
#     def static_output(self, text):
#     def bind(self):
#     def _exec(self, construct, execution_options=None,
#                             multiparams=(),
#                             params=util.immutabledict()):
#     def execute(self, sql, execution_options=None):
#     def alter_column(self, table_name, column_name,
#                         nullable=None,
#                         server_default=False,
#                         name=None,
#                         type_=None,
#                         schema=None,
#                         autoincrement=None,
#                         existing_type=None,
#                         existing_server_default=None,
#                         existing_nullable=None,
#                         existing_autoincrement=None
#                     ):
#     def add_column(self, table_name, column):
#     def drop_column(self, table_name, column, **kw):
#     def add_constraint(self, const):
#     def drop_constraint(self, const):
#     def rename_table(self, old_table_name, new_table_name, schema=None):
#     def create_table(self, table):
#     def drop_table(self, table):
#     def create_index(self, index):
#     def drop_index(self, index):
#     def bulk_insert(self, table, rows):
#     def compare_type(self, inspector_column, metadata_column):
#     def compare_server_default(self, inspector_column,
#                             metadata_column,
#                             rendered_metadata_default):
#     def start_migrations(self):
#     def emit_begin(self):
#     def emit_commit(self):
# def _render_literal_bindparam(element, compiler, **kw):
# def _string_compare(t1, t2):
# def _numeric_compare(t1, t2):


from alembic import util
from alembic.ddl import impl
from sqlalchemy.types import NULLTYPE, Integer
from sqlalchemy import schema, sql
from contextlib import contextmanager
import alembic
            from sqlalchemy.sql import column, func

            op.create_check_constraint(
                "ck_user_name_len",
                "user",
                func.len(column('name')) > 5
            )

        CHECK constraints are usually against a SQL expression, so ad-hoc
        table metadata is usually needed.   The function will convert the given
        arguments into a :class:`sqlalchemy.schema.CheckConstraint` bound
        to an anonymous table in order to emit the CREATE statement.

        :param name: Name of the check constraint.  The name is necessary
         so that an ALTER statement can be emitted.  For setups that
         use an automated naming scheme such as that described at
         `NamingConventions <http://www.sqlalchemy.org/trac/wiki/UsageRecipes/NamingConventions>`_,
         ``name`` here can be ``None``, as the event listener will
         apply the name to the constraint object when it is associated
         with the table.
        :param source: String name of the source table.  Currently
         there is no support for dotted schema names.
        :param condition: SQL expression that's the condition of the constraint.
         Can be a string or SQLAlchemy expression language structure.
        :param deferrable: optional bool. If set, emit DEFERRABLE or NOT DEFERRABLE when
         issuing DDL for this constraint.
        :param initially: optional string. If set, emit INITIALLY <value> when issuing DDL
         for this constraint.

        """

# Path: alembic/util.py
# class CommandError(Exception):
# class memoized_property(object):
# class immutabledict(dict):
# def _safe_int(value):
# def requires_07(feature):
# def template_to_file(template_file, dest, **kw):
# def create_module_class_proxy(cls, globals_, locals_):
#     def _install_proxy(obj):
#     def _remove_proxy():
#     def _create_op_proxy(name):
#         def _name_error(name):
# def coerce_resource_to_filename(fname):
# def status(_statmsg, fn, *arg, **kw):
# def err(message):
# def obfuscate_url_pw(u):
# def asbool(value):
# def warn(msg):
# def msg(msg, newline=True):
# def load_python_file(dir_, filename):
# def pyc_file_from_path(path):
# def rev_id():
#     def __init__(self, fget, doc=None):
#     def __get__(self, obj, cls):
#     def _immutable(self, *arg, **kw):
#     def __new__(cls, *args):
#     def __init__(self, *args):
#     def __reduce__(self):
#     def union(self, d):
#     def __repr__(self):
# 
# Path: alembic/ddl/impl.py
# class ImplMeta(type):
# class DefaultImpl(object):
# class _literal_bindparam(_BindParamClause):
#     def __init__(cls, classname, bases, dict_):
#     def __init__(self, dialect, connection, as_sql,
#                     transactional_ddl, output_buffer,
#                     context_opts):
#     def get_by_dialect(cls, dialect):
#     def static_output(self, text):
#     def bind(self):
#     def _exec(self, construct, execution_options=None,
#                             multiparams=(),
#                             params=util.immutabledict()):
#     def execute(self, sql, execution_options=None):
#     def alter_column(self, table_name, column_name,
#                         nullable=None,
#                         server_default=False,
#                         name=None,
#                         type_=None,
#                         schema=None,
#                         autoincrement=None,
#                         existing_type=None,
#                         existing_server_default=None,
#                         existing_nullable=None,
#                         existing_autoincrement=None
#                     ):
#     def add_column(self, table_name, column):
#     def drop_column(self, table_name, column, **kw):
#     def add_constraint(self, const):
#     def drop_constraint(self, const):
#     def rename_table(self, old_table_name, new_table_name, schema=None):
#     def create_table(self, table):
#     def drop_table(self, table):
#     def create_index(self, index):
#     def drop_index(self, index):
#     def bulk_insert(self, table, rows):
#     def compare_type(self, inspector_column, metadata_column):
#     def compare_server_default(self, inspector_column,
#                             metadata_column,
#                             rendered_metadata_default):
#     def start_migrations(self):
#     def emit_begin(self):
#     def emit_commit(self):
# def _render_literal_bindparam(element, compiler, **kw):
# def _string_compare(t1, t2):
# def _numeric_compare(t1, t2):


# Path: alembic/operations.py
from alembic import util
from alembic.ddl import impl
from sqlalchemy.types import NULLTYPE, Integer
from sqlalchemy import schema, sql
from contextlib import contextmanager
import alembic

            from sqlalchemy.sql import column, func

            op.create_check_constraint(
                "ck_user_name_len",
                "user",
                func.len(column('name')) > 5
            )

        CHECK constraints are usually against a SQL expression, so ad-hoc
        table metadata is usually needed.   The function will convert the given
        arguments into a :class:`sqlalchemy.schema.CheckConstraint` bound
        to an anonymous table in order to emit the CREATE statement.

        :param name: Name of the check constraint.  The name is necessary
         so that an ALTER statement can be emitted.  For setups that
         use an automated naming scheme such as that described at
         `NamingConventions <http://www.sqlalchemy.org/trac/wiki/UsageRecipes/NamingConventions>`_,
         ``name`` here can be ``None``, as the event listener will
         apply the name to the constraint object when it is associated
         with the table.
        :param source: String name of the source table.  Currently
         there is no support for dotted schema names.
        :param condition: SQL expression that's the condition of the constraint.
         Can be a string or SQLAlchemy expression language structure.
        :param deferrable: optional bool. If set, emit DEFERRABLE or NOT DEFERRABLE when
         issuing DDL for this constraint.
        :param initially: optional string. If set, emit INITIALLY <value> when issuing DDL
         for this constraint.

        """

        self.impl.add_constraint(