Migration Plan [deprecated]
https://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/migrations/plan
This endpoint enables creating a migration plan for a given database branch.
Expected Parameters
Name | Description | In | Required | Schema |
---|---|---|---|---|
db_branch_name | The DBBranchName matches the pattern `{db_name}:{branch_name}`. | path | ✅ | string |
Compute Migration Plan [Deprecated]
POSThttps://{your-workspace-slug}.{region}.xata.sh/db/db_branch_name/migrations/plan
Compute a migration plan from a target schema the branch should be migrated too.
Request Body Type Definition
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
type GetBranchMigrationPlan = Schema; type Schema = { tables: Table[]; tablesOrder?: string[]; }; type Table = { id?: string; name: TableName; columns: Column[]; revLinks?: RevLink[]; }; /** * @maxLength 255 * @minLength 1 * @pattern [a-zA-Z0-9_\-~]+ */ type TableName = string; type Column = { name: string; type: "bool" | "int" | "float" | "string" | "text" | "email" | "multiple" | "link" | "object" | "datetime" | "vector" | "file[]" | "file"; link?: ColumnLink; vector?: ColumnVector; notNull?: boolean; defaultValue?: string; unique?: boolean; columns?: Column[]; }; type RevLink = { linkID: string; table: string; }; type ColumnLink = { table: string; }; type ColumnVector = { /* * @maximum 10000 * @minimum 2 */ dimension: number; };
Status Code | Description | Example Response/Type Definition |
---|---|---|
200 | Example response |
|
400 | Bad Request |
|
401 | Authentication Error |
|
404 | Example response |
|
5XX | Unexpected Error |