mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Reset active price ids for product on Stripe disconnect
refs e17f5004cc
In case of Stripe disconnect, it was possible that the product table still contained reference to monthly/yearly price id while the price itself isn't present in the DB. As part of Stripe disconnect reset, this also resets monthly/yearly price id for product.
This commit is contained in:
parent
faf9598d7a
commit
b4f53a0b75
1 changed files with 3 additions and 0 deletions
|
@ -193,6 +193,9 @@ module.exports = {
|
|||
}
|
||||
|
||||
/** Delete all Stripe data from DB */
|
||||
await ghostBookshelf.knex.raw(`
|
||||
UPDATE products SET monthly_price_id = null, yearly_price_id = null
|
||||
`);
|
||||
await ghostBookshelf.knex.raw(`
|
||||
DELETE FROM stripe_prices
|
||||
`);
|
||||
|
|
Loading…
Reference in a new issue