test refactor, don't hardcode default for `table_name_prefix`.
`ActiveRecord::SchemaMigration` has no primary key.

Before this patch, using `ActiveRecord::Base.primary_key_prefix_type`
with `:table_name_with_underscore` would change the `SchemaMigration` model
to have a primary key. This resulted in broken queries for PG because it tried
to return the inserted PK (which does not exist).

Closes #15051.
Closes #15419.