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

263
Views
¿Cómo agregar un nuevo valor ENUM a la tabla existente usando sequalize en la base de datos PostgreSQL?

Digamos que creé una tabla en mi base de datos PostgreSQL usando sequelize :

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

Como puede ver, hay 3 valores ENUM, ahora necesito agregar un valor ENUM más usando una nueva migración. Estaba tratando de hacer algo como esto, pero no funciona:

 '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) { } };

Entonces, ¿cómo puedo hacer esto? No importa cómo, usando consulta o sintaxis de secuenciación pura.

¡Gracias!

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!