pending; nothing runs untilPOST /provision/databases/{id}/migrations/apply (or /migrate). Themigration:write (area resource, on the database).curl --location 'https://api.prod-orm.io/provision/databases//migrations' \
--header 'Content-Type: application/json' \
--data '{
"version": "0001",
"name": "posts",
"operations": [
{
"op": "createTable",
"table": "posts",
"columns": {
"id": {
"type": "INTEGER",
"primaryKey": true,
"autoIncrement": true
},
"title": {
"type": "VARCHAR(200)"
}
}
},
{
"op": "addIndex",
"table": "posts",
"name": "posts_title_idx",
"fields": [
"title"
]
}
]
}'{
"migration": {
"id": 0,
"version": "string",
"name": "string",
"state": "pending",
"checksum": "string",
"operations": [
{
"op": "createTable",
"table": "string",
"name": "string",
"columns": {},
"definition": {},
"fields": [
"string"
]
}
],
"sql": "string",
"appliedAt": "2019-08-24T14:15:22.123Z",
"durationMs": 0,
"reversible": true
},
"statements": [
"string"
]
}