Skip to content

Commit f9fbfcb

Browse files
feat: combine migrations into one
1 parent ca16c6e commit f9fbfcb

4 files changed

Lines changed: 9 additions & 91 deletions

src/Migration/Migration1775046446FlowStateTable.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,20 @@ public function update(Connection $connection): void
2121
`id` BINARY(16) NOT NULL PRIMARY KEY,
2222
`flow_id` BINARY(16) NOT NULL,
2323
`state` VARCHAR(255) NOT NULL,
24-
`error` LONGTEXT NULL,
25-
`data` LONGTEXT NULL,
24+
`error` JSON NULL,
25+
`data` JSON NULL,
26+
`user_id` BINARY(16) NULL,
27+
`customer_id` BINARY(16) NULL,
28+
`integration_id` BINARY(16) NULL,
2629
`created_at` DATETIME(3) NOT NULL,
2730
`updated_at` DATETIME(3) NULL,
28-
CONSTRAINT `frosh_flow_state__flow_id` FOREIGN KEY (`flow_id`) REFERENCES `flow` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
31+
CONSTRAINT `frosh_flow_state__flow_id` FOREIGN KEY (`flow_id`) REFERENCES `flow` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
32+
CONSTRAINT `frosh_flow_state__user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON UPDATE CASCADE ON DELETE SET NULL,
33+
CONSTRAINT `frosh_flow_state__customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`id`) ON UPDATE CASCADE ON DELETE SET NULL,
34+
CONSTRAINT `frosh_flow_state__integration_id` FOREIGN KEY (`integration_id`) REFERENCES `integration` (`id`) ON UPDATE CASCADE ON DELETE SET NULL
2935
);
3036
SQL;
3137

3238
$connection->executeStatement($sql);
33-
3439
}
35-
3640
}

src/Migration/Migration1775048197FroshFlowStateDataAsJson.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/Migration/Migration1775076105FlowStateTriggeringUser.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/Migration/Migration1775132753ChangeExceptionColumnToJson.php

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)