Creates a named set of migration ids given a named set of version numbers and a sequence id.

See the migration guide for more info on how to use this API.

function createMigrationIds<
  const ID extends string,
  const Versions extends Record<string, number>,
>(
  sequenceId: ID,
  versions: Versions
): {
  [K in keyof Versions]: `${ID}/${Versions[K]}`
}
Parameters
NameDescription

sequenceId

ID

versions

Versions
Returns
{
  [K in keyof Versions]: `${ID}/${Versions[K]}`
}
createComputedCachecreateMigrationSequence