Added relational fields and migrated database