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
Name | Description | In | Required | Schema |
---|---|---|---|---|
db_branch_name | The DBBranchName matches the pattern | path | ✅ | string |
Apply a Pgroll Migration
POSThttps://{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;
};
type ApplyMigration = {
id?: string;
message: string;
};
{
"message": "invalid API key"
}
type ApplyMigration = {
id?: string;
message: string;
};
type ApplyMigration = void;
type ApplyMigration = void;
type ApplyMigration = void;