assertEquals ("sequence-3.tree", sequence.getStorageUniqueKey());
}
@Test
public void columnSequence() {
NewAISBuilder builder = AISBBasedBuilder.create(SCHEMA, typesTranslator());
TableName sequenceName = new TableName (SCHEMA, "sequence-4");
builder.sequence(sequenceName.getTableName());
builder.table("customers").
colBigInt("customer_id", false).
colString("customer_name", 100, false).
pk("customer_id");
AkibanInformationSchema inAIS = builder.unvalidatedAIS();
Column idColumn = inAIS.getTable(new TableName (SCHEMA, "customers")).getColumn(0);
idColumn.setDefaultIdentity(true);
idColumn.setIdentityGenerator(inAIS.getSequence(sequenceName));
AkibanInformationSchema outAIS = writeAndRead(builder.ais());
assertNotNull(outAIS.getSequence(sequenceName));
Column outColumn = outAIS.getTable(new TableName(SCHEMA, "customers")).getColumn(0);
assertNotNull (outColumn.getDefaultIdentity());
assertTrue (outColumn.getDefaultIdentity());