Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. 'use strict';
  2. var fs = require('fs');
  3.  
  4. module.exports = {
  5. up: function (queryInterface, Sequelize, done) {
  6. return fs.readFile('./node_modules/pg-job-queue/lib/schema.sql', 'utf-8', function (err, data) {
  7. return queryInterface.sequelize.query(data)
  8. .then(function (response) {
  9. done();
  10. }).catch(function (err) {
  11. done();
  12. });
  13. });
  14. },
  15.  
  16. down: function (queryInterface, Sequelize, done) {
  17. /*
  18. Add reverting commands here.
  19. Return a promise to correctly handle asynchronicity.
  20.  
  21. Example:
  22. return queryInterface.dropTable('users');
  23. */
  24. return queryInterface.dropTable('JobQueue');
  25. }
  26. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement