-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
.../extension-common-flyway/src/main/resources/db/migration/V22__231011_CREATE_agg_TABLE.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,34 @@ | ||
CREATE TABLE IF NOT EXISTS `agg_offset_v1` ( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`gmt_create` datetime NOT NULL, | ||
`gmt_modified` datetime NOT NULL, | ||
`partition` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`consumer_group` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`version` bigint NOT NULL, | ||
`data` blob, | ||
PRIMARY KEY (`id`), | ||
KEY `k_partition_version` (`partition`,`consumer_group`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | ||
|
||
CREATE TABLE IF NOT EXISTS `agg_task_v1` ( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`gmt_create` datetime NOT NULL, | ||
`gmt_modified` datetime NOT NULL, | ||
`agg_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`version` bigint NOT NULL, | ||
`json` text COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`deleted` int NOT NULL, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `uk_agg_id_version` (`agg_id`,`version`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | ||
|
||
CREATE TABLE IF NOT EXISTS `agg_state_v1` ( | ||
`id` bigint NOT NULL AUTO_INCREMENT, | ||
`gmt_create` datetime NOT NULL, | ||
`gmt_modified` datetime NOT NULL, | ||
`partition` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`consumer_group` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`state` longblob, | ||
PRIMARY KEY (`id`), | ||
UNIQUE KEY `uk_partition` (`partition`, `consumer_group`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |