@javalabs/prisma-client 1.0.25 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
-- Add Athena match tracking fields to manual_payments table
|
|
2
|
-
ALTER TABLE
|
|
3
|
-
|
|
4
|
-
ADD
|
|
5
|
-
|
|
2
|
+
ALTER TABLE
|
|
3
|
+
manual_payments
|
|
4
|
+
ADD
|
|
5
|
+
COLUMN IF NOT EXISTS athena_matched BOOLEAN DEFAULT false,
|
|
6
|
+
ADD
|
|
7
|
+
COLUMN IF NOT EXISTS athena_match_id VARCHAR(255),
|
|
8
|
+
ADD
|
|
9
|
+
COLUMN IF NOT EXISTS athena_matched_at TIMESTAMPTZ(6);
|
|
6
10
|
|
|
7
11
|
COMMENT ON COLUMN manual_payments.athena_matched IS 'Indica si el pago fue matched con una transacción de Athena';
|
|
12
|
+
|
|
8
13
|
COMMENT ON COLUMN manual_payments.athena_match_id IS 'ID de la transacción de Athena con la que se hizo match';
|
|
14
|
+
|
|
9
15
|
COMMENT ON COLUMN manual_payments.athena_matched_at IS 'Fecha y hora en que se hizo el match con Athena';
|
|
10
16
|
|
|
11
17
|
-- Crear índice para optimizar búsquedas por athena_match_id
|
|
12
|
-
CREATE INDEX IF NOT EXISTS idx_manual_payments_athena_match_id ON manual_payments(athena_match_id);
|
|
13
|
-
|
|
18
|
+
CREATE INDEX IF NOT EXISTS idx_manual_payments_athena_match_id ON manual_payments(athena_match_id);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Add bank_receipt_number column to manual_payments table
|
|
2
|
+
ALTER TABLE manual_payments
|
|
3
|
+
ADD COLUMN IF NOT EXISTS bank_receipt_number VARCHAR(255);
|
|
4
|
+
|
|
5
|
+
-- Create index for faster duplicate checking
|
|
6
|
+
CREATE INDEX IF NOT EXISTS idx_manual_payments_bank_receipt_number
|
|
7
|
+
ON manual_payments(bank_receipt_number)
|
|
8
|
+
WHERE bank_receipt_number IS NOT NULL;
|
|
9
|
+
|
package/prisma/schema.prisma
CHANGED
|
@@ -242,6 +242,7 @@ model manual_payments {
|
|
|
242
242
|
amount_received Decimal? @db.Decimal(10, 2)
|
|
243
243
|
currency String @db.VarChar(10)
|
|
244
244
|
bank_transaction_id Int?
|
|
245
|
+
bank_receipt_number String? @db.VarChar(255)
|
|
245
246
|
receipt_image_url String? @db.Text
|
|
246
247
|
notes String?
|
|
247
248
|
status enum_transaction_status @default(pending)
|
|
@@ -263,6 +264,7 @@ model manual_payments {
|
|
|
263
264
|
|
|
264
265
|
@@index([bank_account_id], map: "idx_manual_payments_bank_account_id")
|
|
265
266
|
@@index([bank_transaction_id], map: "idx_manual_payments_bank_transaction_id")
|
|
267
|
+
@@index([bank_receipt_number], map: "idx_manual_payments_bank_receipt_number")
|
|
266
268
|
@@index([country_code], map: "idx_manual_payments_country_code")
|
|
267
269
|
@@index([created_at], map: "idx_manual_payments_created_at")
|
|
268
270
|
@@index([id], map: "idx_manual_payments_id")
|