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

replace-enum-postgresql

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replace-enum-postgresql - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

2

package.json
{
"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.
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