示例#1
0
文件: test_op.py 项目: RazerM/alembic
 def test_create_index(self):
     schema_obj = schemaobj.SchemaObjects()
     idx = schema_obj.index('x', 'y', ['z'])
     op = ops.CreateIndexOp.from_index(idx)
     is_(
         op.to_index(), idx
     )
示例#2
0
    def test_create_index_add_kw(self):
        schema_obj = schemaobj.SchemaObjects()
        idx = schema_obj.index("x", "y", ["z"])
        op = ops.CreateIndexOp.from_index(idx)

        op.kw["postgresql_concurrently"] = True

        eq_(op.to_index().dialect_kwargs["postgresql_concurrently"], True)
        eq_(
            op.reverse().to_index().dialect_kwargs["postgresql_concurrently"],
            True,
        )
示例#3
0
文件: test_op.py 项目: lkpdn/alembic
 def test_create_index(self):
     schema_obj = schemaobj.SchemaObjects()
     idx = schema_obj.index("x", "y", ["z"])
     op = ops.CreateIndexOp.from_index(idx)
     is_(op.to_index(), idx)
示例#4
0
 def test_create_index(self):
     schema_obj = schemaobj.SchemaObjects()
     idx = schema_obj.index('x', 'y', ['z'])
     op = ops.CreateIndexOp.from_index(idx)
     is_(op.to_index(), idx)
示例#5
0
 def test_drop_index(self):
     schema_obj = schemaobj.SchemaObjects()
     idx = schema_obj.index("x", "y", ["z"])
     op = ops.DropIndexOp.from_index(idx)
     is_not_(op.to_index(), idx)
示例#6
0
文件: test_op.py 项目: zzzeek/alembic
 def test_create_index(self):
     schema_obj = schemaobj.SchemaObjects()
     idx = schema_obj.index("x", "y", ["z"])
     op = ops.CreateIndexOp.from_index(idx)
     is_(op.to_index(), idx)