Exemplo n.º 1
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
     )
Exemplo n.º 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,
        )
Exemplo n.º 3
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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 6
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)