confirm sqldrop
This commit is contained in:
parent
0f5ac18479
commit
ed7bef48ec
2 changed files with 13 additions and 9 deletions
|
@ -29,11 +29,15 @@ function createDump(callback) {
|
|||
});
|
||||
}
|
||||
|
||||
createDump(err => {
|
||||
if (err) {
|
||||
log.error('sqldrop', err);
|
||||
process.exit(1);
|
||||
}
|
||||
log.info('sqldrop', 'Command completed, all tables dropped from "%s"', config.mysql.database);
|
||||
process.exit(0);
|
||||
});
|
||||
if (process.env.CONFIRM === 'Y') {
|
||||
createDump(err => {
|
||||
if (err) {
|
||||
log.error('sqldrop', err);
|
||||
process.exit(1);
|
||||
}
|
||||
log.info('sqldrop', 'Command completed, all tables dropped from "%s"', config.mysql.database);
|
||||
process.exit(0);
|
||||
});
|
||||
} else {
|
||||
log.error('sqldrop', 'Run command as "CONFIRM=Y npm run sqldrop"');
|
||||
}
|
||||
|
|
|
@ -389,7 +389,7 @@ CREATE TABLE `users` (
|
|||
|
||||
LOCK TABLES `users` WRITE;
|
||||
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
||||
INSERT INTO `users` VALUES (1,'admin','$2a$10$mzKU71G62evnGB2PvQA4k..Wf9jASk.c7a8zRMHh6qQVjYJ2r/g/K','admin@example.com',NULL,NULL,'2016-04-20 17:15:36');
|
||||
INSERT INTO `users` VALUES (1,'admin','$2a$10$mzKU71G62evnGB2PvQA4k..Wf9jASk.c7a8zRMHh6qQVjYJ2r/g/K','admin@example.com',NULL,NULL,'2016-04-20 17:20:48');
|
||||
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
|
Loading…
Reference in a new issue