https://github.com/timkelty/shipit-db
https://github.com/timkelty/shipit-db
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/timkelty/shipit-db
- Owner: timkelty
- Created: 2015-01-27T00:44:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T19:18:29.000Z (over 9 years ago)
- Last Synced: 2025-03-15T11:47:00.715Z (over 1 year ago)
- Language: JavaScript
- Size: 32.2 KB
- Stars: 21
- Watchers: 1
- Forks: 9
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shipit-db
A set of database tasks for [Shipit](https://github.com/shipitjs/shipit).
**Features:**
- Works via [shipit-cli](https://github.com/shipitjs/shipit) and [grunt-shipit](https://github.com/shipitjs/grunt-shipit)
- Optionally ignore specified tables
**Roadmap**
- DB Backup tasks
## Install
```
npm install shipit-db
```
## Usage
### Example `shipitfile.js`
```js
module.exports = function (shipit) {
require('shipit-db')(shipit);
shipit.initConfig({
default: {
db: {
ignoreTables: ['some_table'],
local: {
host : 'localhost',
adapter : 'mysql',
username : 'root',
password : 'root',
socket : '/Applications/MAMP/tmp/mysql/mysql.sock',
database : 'mysite_local',
},
}
},
staging: {
servers: 'user@myserver.com',
db: {
remote: {
host : '127.0.0.1',
adapter : 'mysql',
username : 'myusername',
password : '123password',
database : 'mysite_staging',
}
}
}
});
};
```
Dump your local database, upload and import to remote:
```
shipit staging db:push
```
Dump your remote database, download and import to local:
```
shipit staging db:pull
```
## Options (`shipit.config.db`)
### `db.ignoreTables`
Type: `Array`
An array of database tables to ignore.
### `db.local` \ `db.remote`
Type: `Object`
An object of database credentials.
## License
MIT