-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathmigration.json
More file actions
75 lines (75 loc) · 1.66 KB
/
migration.json
File metadata and controls
75 lines (75 loc) · 1.66 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
"name": "Migration",
"plural": "Migrations",
"base": "PersistedModel",
"description": "View and run pending migrations.",
"properties": {
"name": {
"type": "String",
"comments": "Name of the migration.",
"required": true
},
"runDtTm": {
"type": "Date",
"comments": "Date and time the migration ran.",
"required": true
}
},
"indexes": {
"name_index": {
"keys": {
"name": 1
},
"options": {
"unique": true
},
"columns": "name",
"kind": "unique"
}
},
"methods": {
"migrateTo": {
"description": "Run all pending migrations",
"http": {
"path": "/migrate",
"verb": "get"
},
"accepts": [{
"arg": "to",
"type": "String",
"description": "Name of the migration script to migrate to. If no name is provided all pending migrations will run."
}]
},
"migrateByName": {
"description": "Run specific migration by name",
"http": {
"path": "/migrateByName",
"verb": "get"
},
"accepts": [{
"arg": "name",
"type": "String",
"required": true,
"description": "Name of the migration script to run."
},
{
"arg" : "record",
"type" : "boolean",
"required" : false
}]
},
"rollbackTo": {
"description": "Rollback migrations",
"http": {
"path": "/rollback",
"verb": "get"
},
"accepts": [{
"arg": "to",
"type": "String",
"required": true,
"description": "Name of the migration script to rollback to."
}]
}
}
}