[db] add foreign key constraint definition to folders table