3D Secure handling
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
// Add 'requires_action' to the paymentStatus enum
|
||||
// This status is used when 3DS authentication is required for a payment
|
||||
await queryInterface.sequelize.query(`
|
||||
ALTER TYPE "enum_Rentals_paymentStatus" ADD VALUE IF NOT EXISTS 'requires_action';
|
||||
`);
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
// Note: PostgreSQL does not support removing values from ENUMs directly.
|
||||
// The 'requires_action' value will remain in the enum but can be unused.
|
||||
// To fully remove it would require recreating the enum and column,
|
||||
// which is complex and risky for production data.
|
||||
console.log(
|
||||
"Note: PostgreSQL does not support removing ENUM values. " +
|
||||
"'requires_action' will remain in the enum but will not be used."
|
||||
);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user