migrations: Read and validate createIndexConcurrently from metadata.yaml
Created by: efritz
Pulled from #29831. This PR reads createIndexConcurrently
from migration metadata and validates that:
- all migrations that create an index concurrently marks this in their metadata,
- if a migration marks this in their metadata, the migration must contain a create index concurrently statement, and
- no migrations create index concurrently on downgrades (old behavior)
Migration definitions with this flag will also have a IndexMetadata
value indicating the target table and index name. This will be required later when we handle these types of migration specifically (outside of a shared lock). As part of the migration sequence, we'd like to be able to automatically drop and recreate invalid indexes - this information will be necessary.