Split DB Updates into seperate files, with the cutoff being 2.0.0

This commit is contained in:
johnnyq
2026-07-22 18:43:11 -04:00
parent 17e4c61067
commit 2b756f6ea4
252 changed files with 4161 additions and 4875 deletions

View File

@@ -0,0 +1,17 @@
<?php
/*
* ITFlow - Database update to version 2.3.1 (from 2.3.0)
* Included by admin/database_updates.php - do not access directly
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
// Migrate Payment Methods from Categories Table to new payment_methods table
$sql_categories = mysqli_query($mysqli, "SELECT * FROM categories WHERE category_type = 'Payment Method' AND category_name != 'Stripe' AND category_archived_at IS NULL");
while ($row = mysqli_fetch_assoc($sql_categories)) {
$category_name = escapeSql($row['category_name']);
mysqli_query($mysqli,"INSERT INTO payment_methods SET payment_method_name = '$category_name'");
}