Switch to PostgreSQL in tests
Fix activerecord integration