FoundationDB/sql-layer — pull request #1003 by MMcM (2013-10-24 00:33:23+00:00)
Title: Simplify SchemaFactory contract

Its existing contract is to return a new AIS containing objects incrementally added to an existing AIS. The existing AIS can default to empty, which is useful for standalone (serviceless) tests. The non-empty case is tricky to get right with mock objects because the existing AIS isn't the total of the existing state any more. But all callers in that fashion immediately register the objects in the returned AIS with the real AIS. So, just have them run DDL against the actual AIS, like a SQL connection would.

Mostly, this means deleting code. The two new things needed are:
* Create an index with FOREIGN KEY as its constraint. Use AISBuilder.
* Load DDL and return the id of the first table defined (the root for dumping data for comparison). Do that by tracking table id changes, rather than making a fourth(!) set of objects just to find the newest ones.