entity_type ) as $group ) { $table = TMDO_Schema_Manager::get_table_name( $this->entity_type, $group ); if ( ! TMDO_Schema_Manager::table_exists( $table ) ) { $missing[] = $group; } } if ( $missing ) { throw new \RuntimeException( 'Schema migration failed; missing tables: ' . implode( ',', $missing ) ); } $count = count( TMDO_Entity_Registry::get_groups_for_type( $this->entity_type ) ); $this->log( $job, "Schema migration ok ({$count} flat tables verified)" ); return array( 'status' => 'ok' ); } }