-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jdbc): log executionId could be null
- Loading branch information
1 parent
0fa6964
commit 6699436
Showing
4 changed files
with
33 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
jdbc-h2/src/main/resources/migrations/h2/V1_13__log_fulltext.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
alter table logs alter column "execution_id" drop not null; | ||
|
||
ALTER TABLE logs | ||
ALTER COLUMN "fulltext" TEXT NOT NULL GENERATED ALWAYS AS ( | ||
JQ_STRING("value", '.namespace') || | ||
JQ_STRING("value", '.flowId') || | ||
COALESCE(JQ_STRING("value", '.taskId'), '') || | ||
COALESCE(JQ_STRING("value", '.executionId'), '') || | ||
COALESCE(JQ_STRING("value", '.taskRunId'), '') || | ||
COALESCE(JQ_STRING("value", '.triggerId'), '') || | ||
COALESCE(JQ_STRING("value", '.message'), '') || | ||
COALESCE(JQ_STRING("value", '.thread'), '') | ||
); |
1 change: 1 addition & 0 deletions
1
jdbc-mysql/src/main/resources/migrations/mysql/V1_13__log_fulltext.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `logs` MODIFY `execution_id` VARCHAR(150) GENERATED ALWAYS AS (value ->> '$.executionId') STORED; |
12 changes: 12 additions & 0 deletions
12
jdbc-postgres/src/main/resources/migrations/postgres/V1_13__log_fulltext.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ALTER TABLE logs DROP COLUMN fulltext; | ||
|
||
ALTER TABLE logs ADD COLUMN fulltext TSVECTOR GENERATED ALWAYS AS ( | ||
FULLTEXT_INDEX(CAST(value ->> 'namespace' AS varchar)) || | ||
FULLTEXT_INDEX(CAST(value ->> 'flowId' AS varchar)) || | ||
FULLTEXT_INDEX(COALESCE(CAST(value ->> 'taskId' AS varchar), '')) || | ||
FULLTEXT_INDEX(COALESCE(CAST(value ->> 'executionId' AS varchar), '')) || | ||
FULLTEXT_INDEX(COALESCE(CAST(value ->> 'taskRunId' AS varchar), '')) || | ||
FULLTEXT_INDEX(COALESCE(CAST(value ->> 'triggerId' AS varchar), '')) || | ||
FULLTEXT_INDEX(COALESCE(CAST(value ->> 'message' AS varchar), '')) || | ||
FULLTEXT_INDEX(COALESCE(CAST(value ->> 'thread' AS varchar), '')) | ||
) STORED |