Skip to content

Commit 8b16235

Browse files
committed
Rename 'workflow_stage_log' to 'workflow_automation_schedule' in SQL and update related queries in Automation class
1 parent 4b54af1 commit 8b16235

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

administrator/components/com_admin/sql/updates/mysql/6.2.0-2026-06-03.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transition_automation` (
2020
KEY `idx_run_as` (`run_as_user_id`)
2121
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 DEFAULT COLLATE = utf8mb4_unicode_ci;
2222

23-
CREATE TABLE IF NOT EXISTS `#__workflow_stage_log` (
23+
CREATE TABLE IF NOT EXISTS `#__workflow_automation_schedule` (
2424
`id` int NOT NULL AUTO_INCREMENT,
2525
`item_id` int NOT NULL DEFAULT 0 COMMENT 'Extension table id value',
2626
`extension` varchar(50) NOT NULL,

installation/sql/mysql/base.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,10 +1293,10 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transition_automation` (
12931293
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
12941294

12951295
--
1296-
-- Table structure for table `#__workflow_stage_log`
1296+
-- Table structure for table `#__workflow_automation_schedule`
12971297
--
12981298

1299-
CREATE TABLE IF NOT EXISTS `#__workflow_stage_log` (
1299+
CREATE TABLE IF NOT EXISTS `#__workflow_automation_schedule` (
13001300
`id` int NOT NULL AUTO_INCREMENT,
13011301
`item_id` int NOT NULL DEFAULT 0 COMMENT 'Extension table id value',
13021302
`extension` varchar(50) NOT NULL,

plugins/workflow/automation/src/Extension/Automation.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function logStageEntry(WorkflowTransitionEvent $event): void
4747
// One query to find which items already have a log entry
4848
$findExistingLogQuery = $db->getQuery(true)
4949
->select($db->quoteName(['item_id', 'id']))
50-
->from($db->quoteName('#__workflow_stage_log'))
50+
->from($db->quoteName('#__workflow_automation_schedule'))
5151
->whereIn($db->quoteName('item_id'), $pksInt)
5252
->where($db->quoteName('extension') . ' = :extension')
5353
->bind(':extension', $context);
@@ -70,7 +70,7 @@ public function logStageEntry(WorkflowTransitionEvent $event): void
7070
$logIds = array_values($toUpdate);
7171

7272
$updateStageLogQuery = $db->getQuery(true)
73-
->update($db->quoteName('#__workflow_stage_log'))
73+
->update($db->quoteName('#__workflow_automation_schedule'))
7474
->bind(':stageId', $toStageId, ParameterType::INTEGER)
7575
->bind(':enteredAt', $now)
7676
->bind(':triggeredBy', $triggeredBy);
@@ -97,7 +97,7 @@ public function logStageEntry(WorkflowTransitionEvent $event): void
9797
// Batch INSERT new rows
9898
if (!empty($toInsert)) {
9999
$insertStageLogQuery = $db->getQuery(true)
100-
->insert($db->quoteName('#__workflow_stage_log'))
100+
->insert($db->quoteName('#__workflow_automation_schedule'))
101101
->columns($db->quoteName([
102102
'item_id',
103103
'extension',
@@ -151,7 +151,7 @@ public function reevaluateOnChange(AfterSaveEvent $event): void
151151
// load this item's stage log entry
152152
$query = $db->getQuery(true)
153153
->select($db->quoteName(['id', 'stage_id', 'entered_at', 'next_transition_at']))
154-
->from($db->quoteName('#__workflow_stage_log'))
154+
->from($db->quoteName('#__workflow_automation_schedule'))
155155
->where($db->quoteName('item_id') . ' = :itemId')
156156
->where($db->quoteName('extension') . ' = :extension')
157157
->bind(':itemId', $itemId, ParameterType::INTEGER)
@@ -178,7 +178,7 @@ public function reevaluateOnChange(AfterSaveEvent $event): void
178178

179179
if ($deadline !== null && $deadline <= $now) {
180180
$update = $db->getQuery(true)
181-
->update($db->quoteName('#__workflow_stage_log'))
181+
->update($db->quoteName('#__workflow_automation_schedule'))
182182
->set($db->quoteName('next_transition_at') . ' = :now')
183183
->where($db->quoteName('id') . ' = :logId')
184184
->bind(':now', $now)

0 commit comments

Comments
 (0)