Apply Migration

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

Apply a pgroll migration to the specified database

Expected parameters

NameDescriptionInRequiredSchema
db_branch_name

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

path✅string

Apply a Pgroll Migration

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

Applies a pgroll migration to the specified database.

Request Body Type Definition

type ApplyMigration = {
    /**
     * Migration name
     */
    name?: string;
    operations: {
        [key: string]: any;
    }[];
};

Responses

type ApplyMigration = {
    /**
     * The id of the migration job
     */
    jobID: string;
};