@vbilopav/pgmigrations
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -254,5 +254,4 @@ const path = require("path"); | ||
let name = hasMultipleDirs ? | ||
(migrationDir.replace(/_/g, " ").replace(/\./g, " ") + " " + suffix.split(".").slice(0, -1).join(".").replace(/_/g, " ")).trim() : | ||
suffix.split(".").slice(0, -1).join(".").replace(/_/g, " "); | ||
let name = (hasMultipleDirs ? (migrationDir + " " + suffix.split(".").slice(0, -1).join(".")) : suffix.split(".").slice(0, -1).join(".")).trim(); | ||
name = name.replace(/[^a-zA-Z0-9]/g, " ").trim().replace(/\s+/g, " "); | ||
@@ -358,3 +357,3 @@ let version = null; | ||
} else { | ||
warning(`Migration file ${fileName} does not contain valid prefix. Skipping...`); | ||
warning(`Migration file ${fileName} does not contain valid prefix. Skipping. Valied prefixes are '${config.upPrefix}', '${config.downPrefix}', '${config.repetablePrefix}', '${config.repetableBeforePrefix}', '${config.beforePrefix}', '${config.afterPrefix}' and separator prefix '${config.separatorPrefix}'.`); | ||
return; | ||
@@ -361,0 +360,0 @@ } |
{ | ||
"name": "@vbilopav/pgmigrations", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "PostgreSQL Migration Tool for Node.js and NPM", | ||
@@ -5,0 +5,0 @@ "author": "vb-consulting", |
@@ -5,5 +5,5 @@ const fs = require("fs"); | ||
const message = (msg, error) => { | ||
const message = (msg, err) => { | ||
msg.split("\n").forEach(line => { | ||
if (error) { | ||
if (err) { | ||
error(line); | ||
@@ -10,0 +10,0 @@ } else { |
64295