add foreign key and primary key