setup models, migrations, relationships, and test environment