hunk.code_window:     "tslint-stylish": "^2.1.0",
       "typescript": "^2.8.1"
     },
     "dependencies": {
       "app-root-path": "^2.0.1",
       "chalk": "^2.3.2",
       "cli-highlight": "^1.2.3",
       "debug": "^3.1.0",
  
hunk.labels: keep keep keep keep add keep keep keep
hunk.after_edit:     "buffer": "^5.1.0",
  
hunk.file_path: package.json
hunk.type: add
file: import "reflect-metadata";
  import {Connection} from "../../../../src";
  import {closeTestingConnections, createTestingConnections} from "../../../utils/test-utils";
  import {expect} from "chai";
  
  describe("indices > conditional index", () => {
  
      let connections: Connection[];
      before(async () => {
          connections = await createTestingConnections({
              entities: [__dirname + "/entity/*{.js,.ts}"],
              enabledDrivers: ["mssql", "postgres", "sqlite"], // only these drivers supports conditional indices
              schemaCreate: true,
              dropSchema: true,
          });
      });
      after(() => closeTestingConnections(connections));
  
      it("should correctly create conditional indices with WHERE condition", () => Promise.all(connections.map(async connection => {
  
          const queryRunner = connection.createQueryRunner();
          let table = await queryRunner.getTable("post");
  
          table!.indices.length.should.be.equal(2);
          expect(table!.indices[0].where).to.be.not.empty;
          expect(table!.indices[1].where).to.be.not.empty;
  
          await queryRunner.release();
  
      })));
  
      it("should correctly drop conditional indices and revert drop", () => Promise.all(connections.map(async connection => {
  
          const queryRunner = connection.createQueryRunner();
          let table = await queryRunner.getTable("post");
          table!.indices.length.should.be.equal(2);
          expect(table!.indices[0].where).to.be.not.empty;
          expect(table!.indices[1].where).to.be.not.empty;
  
          await queryRunner.dropIndices(table!, table!.indices);
  
          table = await queryRunner.getTable("post");
          table!.indices.length.should.be.equal(0);
  
          await queryRunner.executeMemoryDownSql();
  
          table = await queryRunner.getTable("post");
          table!.indices.length.should.be.equal(2);
          expect(table!.indices[0].where).to.be.not.empty;
          expect(table!.indices[1].where).to.be.not.empty;
  
          await queryRunner.release();
  
      })));
  
  });
  