(schema.sql) Fix primary key names
(API) Fix SQL field names