Skip to content

Commit

Permalink
Add a test with computed column names
Browse files Browse the repository at this point in the history
References #2
  • Loading branch information
adangel committed Mar 22, 2016
1 parent 480a3bb commit 526c754
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,17 @@ public void testRollback() throws RollbackImpossibleException {
SqlStatement[] statements = c.generateRollbackStatements(database);
assertPerconaChange(statements, "DROP INDEX theIndexName");
}

@Test
public void testWithComputedColumn() {
AddColumnConfig column = new AddColumnConfig();
column.setName("computedName", true);
AddColumnConfig column2 = new AddColumnConfig();
column2.setName("computed2", false);
c.getColumns().clear();
c.addColumn(column);
c.addColumn(column2);
SqlStatement[] statements = c.generateStatements(database);
assertPerconaChange(statements, "ADD UNIQUE INDEX theIndexName (computedName, computed2)");
}
}

0 comments on commit 526c754

Please # to comment.