Stock history table key unique; syntax changes