-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHELP
64 lines (47 loc) · 1.57 KB
/
HELP
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
NAME
ODB - CLI
COMMANDS
help
create [TYPE]
migrate [TYPE]<up | down> [FILE_NAME]<*.db | *.yaml> | [DIRECTORY]
run [FILE_NAME]<*.db | *.yaml>
sql
token [TOKEN] (default ODB_TOKEN env variable (ex. export ODB_TOKEN=...))
config [FILE_NAME] (default .odbrc)
version
FLAGS
-h help
-c create [TYPE]
-m migrate [TYPE]<up | down> [FILE_NAME]<*.db | *.yaml> | [DIRECTORY]
-r run [FILE_NAME]<*.db | *.yaml>
-s sql
-t token [TOKEN] (default ODB_TOKEN env variable "ex. export ODB_TOKEN=...")
-x config [FILE_NAME] (default .odbrc)
-v version
USAGES
$ odb create blog
$ odb migrate up 20220318
$ odb migrate up 20220318.blog.db
$ odb migrate up 20220318.api-blog.yaml
$ odb run blog.db
$ odb run api-blog.yaml
$ odb sql
VERSION
__PACKAGE__
DESCRIPTION
CLI to upgrade or downgrade migrates of the databases schemas and the APIs definitions.
It is required the token, it could be set using the .odbrc (token=...) or the environment variable ODB_TOKEN or pass the token using the flag --token (-t).
We recommend using the date format yyyymmdd (20220318) as a prefix for the directories and files.
-- 20220318
|-- 20220318.blog.(db|sql)
|-- 20220318.api-blog.yaml
// 20220318.blog.db OR 20220318.api-blog.yaml
---------------------
-- Up
---------------------
The code to upgrade
---------------------
-- Down
---------------------
The code to downgrade
If there is an error during the <up> migrate, please execute a <down> migrate.