Update database schema to include unique keys

Slightly updated the basic db schema setup to include unique columns;
this required some columns to be converted to the 'varchar' type.