A set of database tasks for Shipit.
Features:
- Works via shipit-cli and grunt-shipit
- Optionally ignore specified tables
Roadmap
- DB Backup tasks
npm install shipit-db
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
Dump your remote database, download and import to a local file:
shipit staging db:dumpfetch
Type: Array
An array of database tables to ignore.
Type: Object
An object of database credentials.
MIT