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
179
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 5.8.0 to 5.8.1

6

CHANGELOG.md
# Change Log
## [5.8.1](2020-10-12)
### Fixed
- Fix sequence generated [#706](https://github.com/salsita/node-pg-migrate/pull/706)
## [5.8.0](2020-09-24)

@@ -4,0 +10,0 @@

2

dist/migration-builder.js

@@ -17,3 +17,3 @@ "use strict";

var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);

@@ -20,0 +20,0 @@ return result;

@@ -6,7 +6,8 @@ import { LiteralUnion, DropOptions, IfNotExistsOption } from './generalTypes';

}
declare type CreateExtensionFn = (extension: LiteralUnion<Extension> | Array<LiteralUnion<Extension>>, options?: CreateExtensionOptions & DropOptions) => string | string[];
declare type StringExtension = LiteralUnion<Extension>;
declare type CreateExtensionFn = (extension: StringExtension | Array<StringExtension>, options?: CreateExtensionOptions & DropOptions) => string | string[];
export declare type CreateExtension = CreateExtensionFn & {
reverse: CreateExtensionFn;
};
export declare type DropExtension = (extension: LiteralUnion<Extension> | Array<LiteralUnion<Extension>>, dropOptions?: DropOptions) => string | string[];
export declare type DropExtension = (extension: StringExtension | Array<StringExtension>, dropOptions?: DropOptions) => string | string[];
export {};
import PgLiteral from './PgLiteral';
export declare type LiteralUnion<T extends U, U = string> = T | (U & {
export declare type LiteralUnion<T extends string> = T | (string & {
zz_IGNORE_ME?: never;

@@ -4,0 +4,0 @@ });

@@ -46,5 +46,4 @@ "use strict";

columns: lodash_1.default.map(columnsWithOptions, (options, columnName) => {
var _a;
const { type, collation, default: defaultValue, unique, primaryKey, notNull, check, references, referencesConstraintName, referencesConstraintComment, deferrable, expressionGenerated, } = options;
const sequenceGenerated = (_a = options.sequenceGenerated) !== null && _a !== void 0 ? _a : options.generated;
const sequenceGenerated = options.sequenceGenerated === undefined ? options.generated : options.sequenceGenerated;
const constraints = [];

@@ -252,5 +251,4 @@ if (collation) {

return (tableName, columnName, options) => {
var _a;
const { default: defaultValue, type, collation, using, notNull, allowNull, comment } = options;
const sequenceGenerated = (_a = options.sequenceGenerated) !== null && _a !== void 0 ? _a : options.generated;
const sequenceGenerated = options.sequenceGenerated === undefined ? options.generated : options.sequenceGenerated;
const actions = [];

@@ -281,3 +279,3 @@ if (defaultValue === null) {

const sequenceOptions = sequences_1.parseSequenceOptions(mOptions.typeShorthands, sequenceGenerated).join(' ');
actions.push(`SET GENERATED ${sequenceGenerated.precedence} AS IDENTITY${sequenceOptions ? ` (${sequenceOptions})` : ''}`);
actions.push(`ADD GENERATED ${sequenceGenerated.precedence} AS IDENTITY${sequenceOptions ? ` (${sequenceOptions})` : ''}`);
}

@@ -284,0 +282,0 @@ }

@@ -109,4 +109,4 @@ # Column Operations

- `comment` _[string]_ - adds comment on column
- `sequenceGenerated` _[object or null]_ - sets or drops identity column
- `sequenceGenerated` _[object or null or false]_ - sets or drops identity column
- sequence options -- see [sequence options section](sequences.md#sequence-options)
- `precedence` _[string]_ - `ALWAYS` or `BY DEFAULT`

@@ -9,8 +9,8 @@ # Sequence Operations

- `increment` _[number]_ - sets first value of sequence
- `minvalue` _[number or boolean]_ - sets minimum value of sequence or `NO MINVALUE` (if value is false or null)
- `maxvalue` _[number or boolean]_ - sets maximum value of sequencee or `NO MAXVALUE` (if value is false or null)
- `minvalue` _[number or null or false]_ - sets minimum value of sequence or `NO MINVALUE` (if value is false or null)
- `maxvalue` _[number or null or false]_ - sets maximum value of sequencee or `NO MAXVALUE` (if value is false or null)
- `start` _[number]_ - sets first value of sequence
- `cache` _[number]_ - sets how many sequence numbers should be preallocated
- `cycle` _[boolean]_ - adds `CYCLE` or `NO CYCLE` clause if option is present
- `owner` _[string or boolean]_ - sets owner of sequence or no owner (if value is false or null)
- `owner` _[string or null or false]_ - sets owner of sequence or no owner (if value is false or null)

@@ -55,3 +55,3 @@ ### `pgm.createSequence( sequence_name, options )`

- sequence options -- see [sequence options section](#sequence-options)
- `restart` _[number or boolean]_ - sets first value of sequence or using `start` value (on true value)
- `restart` _[number or true]_ - sets first value of sequence or using `start` value (on true value)

@@ -58,0 +58,0 @@ ---

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

@@ -55,23 +55,23 @@ "author": "Theo Ephraim",

"devDependencies": {
"@types/chai": "4.2.12",
"@types/chai": "4.2.13",
"@types/chai-as-promised": "7.1.3",
"@types/lodash": "4.14.161",
"@types/lodash": "4.14.162",
"@types/mkdirp": "1.0.1",
"@types/mocha": "8.0.3",
"@types/proxyquire": "1.3.28",
"@types/sinon": "9.0.5",
"@types/sinon-chai": "3.2.4",
"@typescript-eslint/eslint-plugin": "3.10.1",
"@typescript-eslint/parser": "3.10.1",
"@types/sinon": "9.0.8",
"@types/sinon-chai": "3.2.5",
"@typescript-eslint/eslint-plugin": "4.4.0",
"@typescript-eslint/parser": "4.4.0",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"config": "3.3.1",
"config": "3.3.2",
"cross-env": "7.0.2",
"docsify-cli": "4.4.1",
"dotenv": "8.2.0",
"eslint": "7.9.0",
"eslint": "7.11.0",
"eslint-config-airbnb-base": "14.2.0",
"eslint-config-prettier": "6.11.0",
"eslint-config-prettier": "6.12.0",
"eslint-import-resolver-typescript": "2.3.0",
"eslint-plugin-import": "2.22.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-prettier": "3.1.4",

@@ -83,7 +83,7 @@ "eslint-plugin-security": "1.4.0",

"mocha": "8.1.3",
"pg": "8.3.3",
"pg": "8.4.1",
"prettier": "2.1.2",
"proxyquire": "2.1.3",
"rimraf": "3.0.2",
"sinon": "9.0.3",
"sinon": "9.2.0",
"sinon-chai": "3.5.0",

@@ -90,0 +90,0 @@ "ts-node": "9.0.0",

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