Capture total_tuple_count only if present
Andreas Brandl authored
The column `total_tuple_count` has only been introduced after the
migration helper had been used for the first time. That is, there is a
preceding migration using the helper. This migration and its schema
version does not know about the later column addition and hence the code
path fails.

We check if the attribute exists here, so we can safely work with it.

This is only needed in code paths that are already being used in
existing migrations.

See https://gitlab.com/gitlab-org/gitlab/-/issues/327447
4102b96f