add activerecord and models for each table