mirror of
https://github.com/itflow-org/itflow
synced 2026-07-24 17:30:43 +00:00
Split DB Updates into seperate files, with the cutoff being 2.0.0
This commit is contained in:
17
admin/database_updates/2.3.1.php
Normal file
17
admin/database_updates/2.3.1.php
Normal 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'");
|
||||
}
|
||||
Reference in New Issue
Block a user