quantumdb/core — pull request #5 by michaeldejong (2014-11-07 10:45:41+00:00)
Title: Added simple linear versioning of SchemaOperations.

It is now possible to define a linear version history of SchemaOperation objects. Here's an example:

```java
Changelog changelog = new Changelog();

changelog.addChangeSet("Create initial tables.",
createTable("accounts")
.with("id", int8(), IDENTITY, AUTO_INCREMENT, NOT_NULL)
.with("name", varchar(255), NOT_NULL)
.with("credit", int8(), "'0'", NOT_NULL),
createTable("transactions")
.with("id", int8(), IDENTITY, AUTO_INCREMENT, NOT_NULL)
.with("from_id", int8(), NOT_NULL)
.with("to_id", int8(), NOT_NULL)
.with("amount", int8()));

changelog.addChangeSet("Add 'blocked' flag for 'accounts' table.",
addColumn("accounts", "blocked", bool(), "'false'", NOT_NULL));

changelog.addChangeSet("Add 'processed' flag for 'transactions' table.",
addColumn("transactions", "processed", bool(), "'false'", NOT_NULL));
```

Descriptions for ChangeSets are optional, and each ChangeSet can contain one or more SchemaOperation objects. The Changelog object also exposes the root Version object and the most recently added Version object (which map to the SchemaOperations as defined in the ChangeSets) through getter methods.