import { type Migrations } from "https://deno.land/x/grammy@v1.31.0/mod.ts";
A mapping from version numbers to session migration functions. Each entry in this object has a version number as a key, and a function as a value.
For a key n
, the respective value should be a function that takes the
previous session data and migrates it to conform with the data that is used
by version n
. The previous session data is defined by the next key less
than n
, such as n-1
. Versions don't have to be integers, nor do all
versions have to be adjacent. For example, you can use [1, 1.5, 4]
as
versions. If n
is the lowest value in the set of keys, the function stored
for n
can be used to migrate session data that was stored before migrations
were used.
Index Signatures
version: number]: (old: any) => any
[