Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-pg-migrate

Package Overview
Dependencies
Maintainers
3
Versions
180
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pg-migrate - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0

11

CHANGELOG.md
# Change Log
## [6.2.0](2021-12-17)
- gh-754: Allow undefined count [#791](https://github.com/salsita/node-pg-migrate/pull/791)
## [6.1.0](2021-12-17)
### Added
- gh-857: Add unique option to drop index [#858](https://github.com/salsita/node-pg-migrate/pull/858)
- gh-813: Stabilize sort for migration files [#818](https://github.com/salsita/node-pg-migrate/pull/818)
## [6.0.0](2021-09-20)

@@ -4,0 +15,0 @@

10

dist/runner.js

@@ -87,5 +87,6 @@ "use strict";

.map((migrationName) => migrations.find(({ name }) => name === migrationName) || migrationName);
const { count = 1 } = options;
const toRun = (options.timestamp
? downMigrations.filter((migration) => typeof migration === 'object' && migration.timestamp >= options.count)
: downMigrations.slice(-Math.abs(options.count === undefined ? 1 : options.count))).reverse();
? downMigrations.filter((migration) => typeof migration === 'object' && migration.timestamp >= count)
: downMigrations.slice(-Math.abs(count))).reverse();
const deletedMigrations = toRun.filter((migration) => typeof migration === 'string');

@@ -99,5 +100,6 @@ if (deletedMigrations.length) {

const upMigrations = migrations.filter(({ name }) => runNames.indexOf(name) < 0 && (!options.file || options.file === name));
const { count = Infinity } = options;
return options.timestamp
? upMigrations.filter(({ timestamp }) => timestamp <= options.count)
: upMigrations.slice(0, Math.abs(options.count === undefined ? Infinity : options.count));
? upMigrations.filter(({ timestamp }) => timestamp <= count)
: upMigrations.slice(0, Math.abs(count));
};

@@ -104,0 +106,0 @@ const checkOrder = (runNames, migrations) => {

2

dist/types.d.ts

@@ -222,3 +222,3 @@ import { ClientBase, ClientConfig, QueryArrayResult, QueryResult, QueryArrayConfig, QueryConfig } from 'pg';

*/
count: number;
count?: number;
/**

@@ -225,0 +225,0 @@ * Treats `count` as timestamp.

{
"name": "node-pg-migrate",
"version": "6.1.0",
"version": "6.2.0",
"description": "Postgresql database migration management tool for node.js",

@@ -5,0 +5,0 @@ "author": "Theo Ephraim",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc