replace-enum-postgresql
Advanced tools
Comparing version 1.2.0 to 1.3.0
{ | ||
"name": "replace-enum-postgresql", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "This package provides the methods needed to replace a PostgreSQL ENUM (ie., in migrations).", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -1,52 +0,3 @@ | ||
# Replace ENUM PostgreSQL | ||
## DEPRECATED | ||
This package provides the methods needed to replace a **PostgreSQL** ENUM in **Sequelize** migrations. | ||
## Install | ||
``` | ||
npm install --save replace-enum-postgresql | ||
``` | ||
## How to use | ||
In this migration we are adding the `on-demand` value to the `recurrenceType` field of `eventRecurrence`: | ||
``` | ||
'use strict'; | ||
const replaceEnum = require('replace-enum-postgresql').default; | ||
module.exports = { | ||
up: (queryInterface, Sequelize) => { | ||
return replaceEnum({ | ||
queryInterface, | ||
tableName: 'eventRecurrence', | ||
columnName: 'recurrenceType', | ||
defaultValue: 'weekly', | ||
newValues: ['weekly', 'monthly', 'yearly', 'on-demand'], | ||
enumName: 'enum_event_recurrence_recurrence_type' | ||
}); | ||
}, | ||
down: (queryInterface, Sequelize) => { | ||
return replaceEnum({ | ||
queryInterface, | ||
tableName: 'eventRecurrence', | ||
columnName: 'recurrenceType', | ||
defaultValue: 'weekly', | ||
newValues: ['weekly', 'monthly', 'yearly'], | ||
enumName: 'enum_event_recurrence_recurrence_type' | ||
}); | ||
} | ||
}; | ||
``` | ||
## Mantainers | ||
* **[Abel M. Osorio](https://github.com/abelosorio)** | ||
## Issues | ||
* https://github.com/abelosorio/replace_enum_postgresql/issues | ||
Use https://www.npmjs.com/package/sequelize-replace-enum-postgres instead. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
0
25560
3