-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·76 lines (53 loc) · 1.64 KB
/
index.js
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
76
#!/usr/bin/env node
'use strict'
const program = require('commander');
const Process = require('./lib/Process');
const path = process.cwd();
const ObProcess = new Process(path);
program
.version('0.1.0')
.usage('<command>')
program
.command('setup')
.description('Setup files for writing migration')
.action(() => {
ObProcess.setup_start();
});
program
.command('make:migration [file_name]')
.description('Creates a json file into migration folder')
.action((file_name) => {
ObProcess.make_migration(file_name);
});
program
.command('migrate')
.description('Read schemas from json and then creates json')
.action(() => {
ObProcess.migrate();
});
program
.command('migrate:refresh')
.description('Deletes current migration and reload it again')
.action(() => {
});
program
.command('migration:rollback')
.description('To rollback the latest migration operation, you may use the rollback command. This command rolls back the last "batch" of migrations, which may include multiple migration files')
.action(() => {
});
program
.command('migration:reset')
.description('The migrate:reset command will roll back all of your application\'s migrations')
.action(() => {
});
program
.command('migration:undo')
.description('The migrate:reset command will roll back all of your application\'s migrations')
.action(() => {
});
program
.command('cache:clear')
.description('The cache:clear command clear cache files.')
.action(() => {
});
program.parse(process.argv);