Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
How to add new ENUM value to existing table using sequalize in PostgreSQL database?

Let's say I created some table in my PostgreSQL database using sequelize:

status: {
        type: Sequelize.ENUM(["approved", "rejected", "new"]),
        allowNull: true
},

As you can see, there are 3 ENUM values, now, I need to add one more ENUM value using new migration. I was trying to do this something like this, but it doesn't work:

'use strict';

module.exports = {
  async up (queryInterface, Sequelize) {
    return queryInterface.sequelize.query("ALTER TABLE risky_transactions ALTER COLUMN status ADD VALUE 'question';")
  },

  async down (queryInterface, Sequelize) {
    
  }
};

So, how can I do this? No matter how, using query or pure sequelize syntax.

Thanks!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!