mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-24 09:40:21 +00:00
algun cambio en las migraciones
This commit is contained in:
@ -2,14 +2,21 @@ databaseChangeLog:
|
||||
- changeSet:
|
||||
id: 0010-drop-unique-tx-gateway
|
||||
author: JJO
|
||||
changes:
|
||||
# 1️⃣ Eliminar la UNIQUE constraint sobre (gateway_transaction_id, type)
|
||||
- dropUniqueConstraint:
|
||||
constraintName: uq_tx_gateway_txid_type
|
||||
|
||||
# ✅ Solo ejecuta el changeSet si existe la UNIQUE constraint
|
||||
preConditions:
|
||||
- onFail: MARK_RAN
|
||||
- uniqueConstraintExists:
|
||||
tableName: payment_transactions
|
||||
constraintName: uq_tx_gateway_txid_type
|
||||
|
||||
changes:
|
||||
# 1️⃣ Eliminar la UNIQUE constraint si existe
|
||||
- dropUniqueConstraint:
|
||||
tableName: payment_transactions
|
||||
constraintName: uq_tx_gateway_txid_type
|
||||
|
||||
# 2️⃣ Crear un índice normal (no único) sobre gateway_transaction_id
|
||||
# para poder seguir buscando rápido por este campo
|
||||
- createIndex:
|
||||
tableName: payment_transactions
|
||||
indexName: idx_payment_tx_gateway_txid
|
||||
@ -20,8 +27,8 @@ databaseChangeLog:
|
||||
rollback:
|
||||
# 🔙 1) Eliminar el índice normal creado en este changeSet
|
||||
- dropIndex:
|
||||
indexName: idx_payment_tx_gateway_txid
|
||||
tableName: payment_transactions
|
||||
indexName: idx_payment_tx_gateway_txid
|
||||
|
||||
# 🔙 2) Restaurar la UNIQUE constraint original
|
||||
- addUniqueConstraint:
|
||||
|
||||
Reference in New Issue
Block a user