postgres-migrate-cli
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -22,5 +22,6 @@ const path = require('path'); | ||
const file = require.main.require(path.join(dir, options.path, migration)); | ||
const down = file.down || file.default?.down; | ||
await connection.transaction(` | ||
${file.down}; | ||
${down}; | ||
DELETE FROM ${options.table} WHERE file = '${migration}'; | ||
@@ -27,0 +28,0 @@ `); |
@@ -29,5 +29,6 @@ const fs = require('fs'); | ||
const file = require.main.require(path.join(dir, options.path, migration)); | ||
const up = file.up || file.default?.up; | ||
await connection.transaction(` | ||
${file.up}; | ||
${up}; | ||
INSERT INTO ${options.table} (file) VALUES ('${migration}'); | ||
@@ -34,0 +35,0 @@ `); |
{ | ||
"name": "postgres-migrate-cli", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Migrations tool for PostgreSQL", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
7713
113