added foreign keys for resource format