Sequelize Enum Utils is a utility package (version 1.1.0) that simplifies PostgreSQL ENUM manipulation in Sequelize migrations. It provides helper functions for safely adding and removing enum members, handling column updates and default values automatically. Unlike raw SQL or manual migration scripts, this package abstracts common pitfalls like enum value existence checks and column default value handling. It is authored by Federico Antunes and targets projects using Sequelize with PostgreSQL. The release cadence is low; the package is stable with a single major version.
npm install sequelize_enum_utilsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates adding and removing enum members in a Sequelize migration using enumUtils.addMember and enumUtils.removeMember.
Wrap in try-catch or check existence before calling addMember.
Always provide a defaultEnumValue to avoid unintended NULL values.
Use require() instead of import.
const { enumUtils } = require('sequelize_enum_utils'); then use enumUtils.addMember(...)Check if the value exists before adding, or catch the error.
npm install sequelize_enum_utils
No dependency data recorded yet.