mirror of
https://github.com/itflow-org/itflow
synced 2026-08-16 04:25:13 +00:00
Revert DB Update
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ITFlow - Database update to version 2.4.9 (from 2.4.8)
|
|
||||||
* Included by admin/database_updates.php - do not access directly
|
|
||||||
*/
|
|
||||||
|
|
||||||
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
|
|
||||||
|
|
||||||
// Refunds are recorded as negative rows in payments so that every existing
|
|
||||||
// SUM(payment_amount) balance calculation picks them up for free. This column
|
|
||||||
// links a refund row back to the payment it reverses, which is what caps the
|
|
||||||
// refundable amount and lets the UI hide the button once a payment is fully
|
|
||||||
// refunded. NULL on every ordinary payment.
|
|
||||||
mysqli_query($mysqli, "ALTER TABLE `payments` ADD COLUMN `payment_refund_of_id` INT(11) DEFAULT NULL");
|
|
||||||
mysqli_query($mysqli, "ALTER TABLE `payments` ADD INDEX `payment_refund_of_id` (`payment_refund_of_id`)");
|
|
||||||
6
db.sql
6
db.sql
@@ -1534,9 +1534,7 @@ CREATE TABLE `payments` (
|
|||||||
`payment_archived_at` datetime DEFAULT NULL,
|
`payment_archived_at` datetime DEFAULT NULL,
|
||||||
`payment_account_id` int(11) NOT NULL,
|
`payment_account_id` int(11) NOT NULL,
|
||||||
`payment_invoice_id` int(11) NOT NULL DEFAULT 0,
|
`payment_invoice_id` int(11) NOT NULL DEFAULT 0,
|
||||||
`payment_refund_of_id` int(11) DEFAULT NULL,
|
PRIMARY KEY (`payment_id`)
|
||||||
PRIMARY KEY (`payment_id`),
|
|
||||||
KEY `payment_refund_of_id` (`payment_refund_of_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
@@ -2999,4 +2997,4 @@ CREATE TABLE `vendors` (
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2026-07-28 21:33:31
|
-- Dump completed on 2026-07-28 22:07:36
|
||||||
|
|||||||
Reference in New Issue
Block a user