-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
17e2f1f
commit 1307586
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
const path = require('path'); | ||
const metasql = require('..'); | ||
|
||
const [,, command, version] = process.argv; | ||
|
||
if (command === 'g') { | ||
const schemaPath = path.join(__dirname, '../application/schemas'); | ||
metasql.migrate(schemaPath); | ||
} else if (command === 'm') { | ||
if (version) console.log(`Migrate to version ${version}`); | ||
else console.log(`Migrate to the latest version`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters