forked from premierdesigns/pddev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpddev.js
23 lines (18 loc) · 1.05 KB
/
pddev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env node
const args = require('args');
// When adding a command here, you have to add an entry to the bin node of package.json.
// Also, when developing locally, you have to run "npm link" for it to work from the command line. When installing
// this app from an npm package (assuming we make one), that part will be taken care of for you.
args
.option('databaseName', 'The database you want to act on')
.command('migratedb', 'Migrate database using scripts in local sql folder', ['m'])
.command('migratedbdown', 'Migrate database down to version (must supply version number)', ['d'])
.command('nukedb', 'Nuke database (drop, then create empty)', ['n'])
.command('rebuilddb', 'Rebuild your database (drop, create, migrate)', ['r'])
.command('restoredb', 'Restore database from bak file', ['s'])
.command('test', 'Test cool new console stuffs', ['t']);
global.options = args.parse(process.argv);
// (async () => {
// global.sqlScripts = await sqlScripts.loadSqlScripts({ databaseName: flags.databaseName});
// })();
console.log('main finished');