Migrate to active record.