public function getMigratedTimestamp($version): int
    {
        $this->createMigrationCollection();

        $cursor = $this->getCollection()->find(
            ['v' => $version]
        );

        if (!$cursor->count()) {
            throw new UnknownVersionException($version);
        }

        if ($cursor->count() > 1) {
            throw new \DomainException(
                'Unexpected duplicate version records in the database'
            );
        }

        $returnVersion = $cursor->getNext();

        // Convert to normalised timestamp
        $ts = new Timestamp($returnVersion['t']);

        return $ts->getTimestamp();
    }