DB schema fixes

Added missing annotations for sequence generation, updating the schema
file, small refactoring.
Schema fixes

fk name changes and  index changes