Add foreign keys to all tables