Skip to content

Commit e209177

Browse files
committed
Fix migration comment
1 parent 12503c2 commit e209177

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

backend/sqlite/db/migrations/000002_add_attributes_table.down.sql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
-- Move activity attributes to attributes table
21
ALTER TABLE `activities` ADD COLUMN `attributes` BLOB NULL;
32
UPDATE `activities` SET `attributes` = `attributes`.`data` FROM `attributes` WHERE `activities`.`id` = `attributes`.`id` AND `activities`.`instance_id` = `attributes`.`instance_id` AND `activities`.`execution_id` = `attributes`.`execution_id`;
43

5-
-- Move history attributes to attributes table
64
ALTER TABLE `history` ADD COLUMN `attributes` BLOB NULL;
75
UPDATE `history` SET `attributes` = `attributes`.`data` FROM `attributes` WHERE `history`.`id` = `attributes`.`id` AND `history`.`instance_id` = `attributes`.`instance_id` AND `history`.`execution_id` = `attributes`.`execution_id`;
86

9-
-- Move pending_events attributes to attributes table
107
ALTER TABLE `pending_events` ADD COLUMN `attributes` BLOB NULL;
118
UPDATE `pending_events` SET `attributes` = `attributes`.`data` FROM `attributes` WHERE `pending_events`.`id` = `attributes`.`id` AND `pending_events`.`instance_id` = `attributes`.`instance_id` AND `pending_events`.`execution_id` = `attributes`.`execution_id`;
129

backend/sqlite/db/migrations/000002_add_attributes_table.up.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ CREATE TABLE IF NOT EXISTS `attributes` (
66
PRIMARY KEY(`id`, `instance_id`)
77
);
88

9-
-- Move activity attributes to payloads table
9+
-- Move activity attributes to attributes table
1010
INSERT OR IGNORE INTO `attributes` (`id`, `instance_id`, `execution_id`, `data`) SELECT `id`, `instance_id`, `execution_id`, `attributes` FROM `activities`;
1111
ALTER TABLE `activities` DROP COLUMN `attributes`;
1212

13-
-- Move history attributes to payloads table
13+
-- Move history attributes to attributes table
1414
INSERT OR IGNORE INTO `attributes` (`id`, `instance_id`, `execution_id`, `data`) SELECT `id`, `instance_id`, `execution_id`, `attributes` FROM `history`;
1515
ALTER TABLE `history` DROP COLUMN `attributes`;
1616

17-
-- Move pending_events attributes to payloads table
17+
-- Move pending_events attributes to attributes table
1818
INSERT OR IGNORE INTO `attributes` (`id`, `instance_id`, `execution_id`, `data`) SELECT `id`, `instance_id`, `execution_id`, `attributes` FROM `pending_events`;
1919
ALTER TABLE `pending_events` DROP COLUMN `attributes`;

0 commit comments

Comments
 (0)