stripe webhooks. removed payout cron. webhook for when amount is deposited into bank. More communication about payout timelines
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.addColumn("Users", "stripePayoutsEnabled", {
|
||||
type: Sequelize.BOOLEAN,
|
||||
defaultValue: false,
|
||||
allowNull: true,
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeColumn("Users", "stripePayoutsEnabled");
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
// Add bankDepositStatus enum column
|
||||
await queryInterface.addColumn("Rentals", "bankDepositStatus", {
|
||||
type: Sequelize.ENUM("pending", "in_transit", "paid", "failed", "canceled"),
|
||||
allowNull: true,
|
||||
defaultValue: null,
|
||||
});
|
||||
|
||||
// Add bankDepositAt timestamp
|
||||
await queryInterface.addColumn("Rentals", "bankDepositAt", {
|
||||
type: Sequelize.DATE,
|
||||
allowNull: true,
|
||||
});
|
||||
|
||||
// Add stripePayoutId to track which Stripe payout included this transfer
|
||||
await queryInterface.addColumn("Rentals", "stripePayoutId", {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: true,
|
||||
});
|
||||
|
||||
// Add bankDepositFailureCode for failed deposits
|
||||
await queryInterface.addColumn("Rentals", "bankDepositFailureCode", {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: true,
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeColumn("Rentals", "bankDepositFailureCode");
|
||||
await queryInterface.removeColumn("Rentals", "stripePayoutId");
|
||||
await queryInterface.removeColumn("Rentals", "bankDepositAt");
|
||||
await queryInterface.removeColumn("Rentals", "bankDepositStatus");
|
||||
|
||||
// Drop the enum type (PostgreSQL specific)
|
||||
await queryInterface.sequelize.query(
|
||||
'DROP TYPE IF EXISTS "enum_Rentals_bankDepositStatus";'
|
||||
);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user