adds AR relationships and some migrations