invalid syntax for unique? added foreign key to make schema silmilar to mysql one.