Issue
I keep running into this error
noteful-json-server@0.0.1 migrate /Users/jessicayiphome/Desktop/Projects/noteful-client-db-master-17.19
> postgrator --config postgrator-config.js
[11:04:50 AM] version of database is: 2
[11:04:50 AM] migrating up to 2
[11:04:50 AM] verifying checksum of migration 001.do.create_folders_table.sql
Error: MD5 checksum failed for migration [1]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! noteful-json-server@0.0.1 migrate: `postgrator --config postgrator-config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the noteful-json-server@0.0.1 migrate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jessicayiphome/.npm/_logs/2020-08-25T15_04_50_228Z-debug.log
when I run npm run migrate
Here is my package.json:
"scripts": {
"test": "mocha --require test/setup.js",
"dev": "nodemon src/server.js",
"migrate": "postgrator --config postgrator-config.js",
"migrate:test": "env NODE_ENV=test npm run migrate",
"migrate:production": "heroku run npm run migrate",
"start": "node src/server.js",
"deploy": "git push heroku master",
"postdeploy": "npm run migrate:production"
and here is my postgrator-config.js
'use strict';
require('dotenv').config();
module.exports = {
"migrationDirectory": "migrations",
"driver": "pg",
"connectionString": process.env.DATABASE_URL
};
Solution
I was receiving the same error, what worked for me was to run npm migrate -- 0. Then run npm migrate which will set it to the upgraded migration.
Answered By - LVM-sharingan Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.