operations.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:pyetje 作者: rorlika 项目源码 文件源码
def create_index(self, name, table_name, columns, schema=None, **kw):
        """Issue a "create index" instruction using the current
        migration context.

        e.g.::

            from alembic import op
            op.create_index('ik_test', 't1', ['foo', 'bar'])

        :param name: name of the index.
        :param table_name: name of the owning table.

         .. versionchanged:: 0.5.0
            The ``tablename`` parameter is now named ``table_name``.
            As this is a positional argument, the old name is no
            longer present.

        :param columns: a list of string column names in the
         table.
        :param schema: Optional schema name to operate within.

         .. versionadded:: 0.4.0

        """

        self.impl.create_index(
            self._index(name, table_name, columns, schema=schema, **kw)
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号