adding activerecord models and updating schema