FoundationDB/sql-layer — pull request #1153 by nathanlws (2014-01-07 20:39:34+00:00)
Title: Sequence tweaks and fixes

Three small-ish tweaks for SERIAL/IDENTITY columns
- No automatic UNIQUE constraint/index as it double indexes the normal case (i.e. SERIAL PRIMARY KEY).
- Change generated sequence names from `_sequence-` to `

__seq`, with the normal suffix for uniqueness (i.e. `$1`). This makes the common case much clearer in tests, output, cli, etc.
- Do not allow NULL to be used for causing a sequence value to be used.This was inconsistent with other defaults and is no longer required as DEFAULT can be used directly.

The first two don't affect existing databases as SERIAL is converted at DDL time and never persisted.

And one fix:
- BasicDDLFunctions#dropSchema() was assuming every sequence that started with '_sequence' was an identity, which isn't strictly correct. Switch to actually looking at the tables.

Note that this includes #1151.