Python sqlalchemy.dialects.mysql 模块,LONGTEXT 实例源码

我们从Python开源项目中,提取了以下12个代码示例,用于说明如何使用sqlalchemy.dialects.mysql.LONGTEXT

项目:vdi-broker    作者:cloudbase    | 项目源码 | 文件源码
def load_dialect_impl(self, dialect):
        if dialect.name == 'mysql':
            return dialect.type_descriptor(mysql.LONGTEXT())
        else:
            return self.impl
项目:vdi-broker    作者:cloudbase    | 项目源码 | 文件源码
def load_dialect_impl(self, dialect):
        if dialect.name == 'mysql':
            return dialect.type_descriptor(mysql.LONGTEXT())
        else:
            return self.impl
项目:coriolis    作者:cloudbase    | 项目源码 | 文件源码
def load_dialect_impl(self, dialect):
        if dialect.name == 'mysql':
            return dialect.type_descriptor(mysql.LONGTEXT())
        else:
            return self.impl
项目:coriolis    作者:cloudbase    | 项目源码 | 文件源码
def load_dialect_impl(self, dialect):
        if dialect.name == 'mysql':
            return dialect.type_descriptor(mysql.LONGTEXT())
        else:
            return self.impl
项目:qinling    作者:openstack    | 项目源码 | 文件源码
def LongText():
    # TODO(rakhmerov): Need to do for postgres.
    return sa.Text().with_variant(mysql.LONGTEXT(), 'mysql')
项目:bilean    作者:openstack    | 项目源码 | 文件源码
def load_dialect_impl(self, dialect):
        if dialect.name == 'mysql':
            return dialect.type_descriptor(mysql.LONGTEXT())
        else:
            return self.impl
项目:bilean    作者:openstack    | 项目源码 | 文件源码
def load_dialect_impl(self, dialect):
        if dialect.name == 'mysql':
            return dialect.type_descriptor(mysql.LONGTEXT())
        else:
            return self.impl
项目:CivilServant    作者:mitmedialab    | 项目源码 | 文件源码
def upgrade_development():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('posts', sa.Column('comment_data', mysql.LONGTEXT(), nullable=True))
    op.add_column('posts', sa.Column('comments_queried_at', sa.DateTime(), nullable=True))
    op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
    ### end Alembic commands ###
项目:CivilServant    作者:mitmedialab    | 项目源码 | 文件源码
def upgrade_test():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('posts', sa.Column('comment_data', mysql.LONGTEXT(), nullable=True))
    op.add_column('posts', sa.Column('comments_queried_at', sa.DateTime(), nullable=True))
    op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
    ### end Alembic commands ###
项目:CivilServant    作者:mitmedialab    | 项目源码 | 文件源码
def upgrade_production():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('posts', sa.Column('comment_data', mysql.LONGTEXT(), nullable=True))
    op.add_column('posts', sa.Column('comments_queried_at', sa.DateTime(), nullable=True))
    op.add_column('posts', sa.Column('created_at', sa.DateTime(), nullable=True))
    ### end Alembic commands ###
项目:quilt    作者:quiltdata    | 项目源码 | 文件源码
def upgrade():
    op.alter_column('instance', 'contents',
               existing_type=mysql.MEDIUMTEXT(collation='utf8_bin'),
               type_=mysql.LONGTEXT(collation='utf8_bin'),
               existing_nullable=False)
项目:quilt    作者:quiltdata    | 项目源码 | 文件源码
def downgrade():
    op.alter_column('instance', 'contents',
               existing_type=mysql.LONGTEXT(collation='utf8_bin'),
               type_=mysql.MEDIUMTEXT(collation='utf8_bin'),
               existing_nullable=False)