Get the migration history for a branch

https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/pgroll/migrations

Get pgroll migration history for the specified branch

Expected parameters

NameDescriptionInRequiredSchema
db_branch_name

The DBBranchName matches the pattern {db_name}:{branch_name}.

path✅string

Get Pgroll Migration History

GET
https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/pgroll/migrations

Responses

type PgRollMigrationHistory = {
    /**
     * The migrations that have been applied to the branch
     */
    migrations: PgRollMigrationHistoryItem[];
};
 
type PgRollMigrationHistoryItem = {
    /**
     * The name of the migration
     */
    name: string;
    /**
     * The pgroll migration that was applied
     */
    migration: string;
    /**
     * The timestamp at which the migration was started
     *
     * @format date-time
     */
    startedAt: string;
    /**
     * The name of the parent migration, if any
     */
    parent?: string;
    /**
     * Whether the migration is completed or not
     */
    done: boolean;
    /**
     * The type of the migration
     */
    migrationType: PgRollMigrationType;
};
 
type PgRollMigrationType = "pgroll" | "inferred";