pon-task-db
DB task set for pon
Installation
$ npm install pon-task-db --save
Usage
'use strict' const pon = const setup seed dump migrate = { const createDB = {/*...*/} const run = }
Signatures
define(options) -> function
Define task
Param | type | Description |
---|---|---|
options | Object | Optional settings |
drop(db, options) -> function
Define task to drop database
Param | type | Description |
---|---|---|
db | function|ClayLump | DB instance or it's creator |
options | Object | Optional settings |
options.unless | string | NODE_ENV to skip |
``
Param | type | Description |
---|
exec(db, options) -> function
Define task to exec database
Param | type | Description |
---|---|---|
db | function|ClayLump | DB instance or it's creator |
options | Object | Optional settings |
migrate(db, handlers) -> function
Define task
Param | type | Description |
---|---|---|
db | function|ClayLump | DB instance or it's creator |
handlers | Object | Migration handlers |
refresh(db, options) -> function
Define task to refresh database
Param | type | Description |
---|---|---|
db | function|ClayLump | DB instance or it's creator |
options | Object | Optional settings |
setup(db, options) -> function
Define task to setup database
Param | type | Description |
---|---|---|
db | function|ClayLump | DB instance or it's creator |
options | Object | Optional settings |
License
This software is released under the Apache-2.0 License.