Migrate to prepared statement