Fixed: Code fields and unique index.
Touchups: sql Code, Consume