File tree Expand file tree Collapse file tree
bootstrap/sql/migrations/native Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -340,3 +340,18 @@ CREATE TABLE IF NOT EXISTS search_index_retry_queue (
340340 KEY idx_search_index_retry_queue_status (status),
341341 KEY idx_search_index_retry_queue_claimed_at (claimedAt)
342342) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_0900_ai_ci;
343+
344+ -- ContextMemory entity - reusable Context Center memory.
345+ CREATE TABLE IF NOT EXISTS context_memory (
346+ id VARCHAR (36 ) GENERATED ALWAYS AS (json - >> ' $.id' ) STORED NOT NULL ,
347+ name VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' $.name' ) STORED NOT NULL ,
348+ nameHash VARCHAR (256 ) NOT NULL COLLATE ascii_bin,
349+ json JSON NOT NULL ,
350+ updatedAt BIGINT UNSIGNED GENERATED ALWAYS AS (json - >> ' $.updatedAt' ) STORED NOT NULL ,
351+ updatedBy VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' $.updatedBy' ) STORED NOT NULL ,
352+ deleted BOOLEAN GENERATED ALWAYS AS (json - > ' $.deleted' ) STORED,
353+
354+ PRIMARY KEY (id),
355+ UNIQUE KEY unique_context_memory_name (nameHash),
356+ INDEX idx_context_memory_updated_at (updatedAt)
357+ ) DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_0900_ai_ci;
Original file line number Diff line number Diff line change @@ -291,3 +291,18 @@ CREATE INDEX IF NOT EXISTS idx_search_index_retry_queue_status
291291 ON search_index_retry_queue (status);
292292CREATE INDEX IF NOT EXISTS idx_search_index_retry_queue_claimed_at
293293 ON search_index_retry_queue (claimedAt);
294+
295+ -- ContextMemory entity - reusable Context Center memory.
296+ CREATE TABLE IF NOT EXISTS context_memory (
297+ id VARCHAR (36 ) GENERATED ALWAYS AS (json - >> ' id' ) STORED NOT NULL ,
298+ name VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' name' ) STORED NOT NULL ,
299+ nameHash VARCHAR (256 ) NOT NULL ,
300+ json JSONB NOT NULL ,
301+ updatedAt BIGINT GENERATED ALWAYS AS ((json - >> ' updatedAt' )::bigint ) STORED NOT NULL ,
302+ updatedBy VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' updatedBy' ) STORED NOT NULL ,
303+ deleted BOOLEAN GENERATED ALWAYS AS ((json - >> ' deleted' )::boolean ) STORED,
304+
305+ PRIMARY KEY (id),
306+ UNIQUE (nameHash)
307+ );
308+ CREATE INDEX IF NOT EXISTS idx_context_memory_updated_at ON context_memory (updatedAt);
Original file line number Diff line number Diff line change @@ -9,18 +9,3 @@ CREATE TABLE IF NOT EXISTS task_migration_mapping (
99 PRIMARY KEY (old_thread_id),
1010 KEY idx_task_migration_mapping_new_task_id (new_task_id)
1111) ENGINE= InnoDB DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_0900_ai_ci;
12-
13- -- ContextMemory entity - reusable Context Center memory.
14- CREATE TABLE IF NOT EXISTS context_memory (
15- id VARCHAR (36 ) GENERATED ALWAYS AS (json - >> ' $.id' ) STORED NOT NULL ,
16- name VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' $.name' ) STORED NOT NULL ,
17- nameHash VARCHAR (256 ) NOT NULL COLLATE ascii_bin,
18- json JSON NOT NULL ,
19- updatedAt BIGINT UNSIGNED GENERATED ALWAYS AS (json - >> ' $.updatedAt' ) STORED NOT NULL ,
20- updatedBy VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' $.updatedBy' ) STORED NOT NULL ,
21- deleted BOOLEAN GENERATED ALWAYS AS (json - > ' $.deleted' ) STORED,
22-
23- PRIMARY KEY (id),
24- UNIQUE KEY unique_context_memory_name (nameHash),
25- INDEX idx_context_memory_updated_at (updatedAt)
26- ) DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_0900_ai_ci;
Original file line number Diff line number Diff line change @@ -11,18 +11,3 @@ CREATE TABLE IF NOT EXISTS task_migration_mapping (
1111
1212CREATE INDEX IF NOT EXISTS idx_task_migration_mapping_new_task_id
1313 ON task_migration_mapping (new_task_id);
14-
15- -- ContextMemory entity - reusable Context Center memory.
16- CREATE TABLE IF NOT EXISTS context_memory (
17- id VARCHAR (36 ) GENERATED ALWAYS AS (json - >> ' id' ) STORED NOT NULL ,
18- name VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' name' ) STORED NOT NULL ,
19- nameHash VARCHAR (256 ) NOT NULL ,
20- json JSONB NOT NULL ,
21- updatedAt BIGINT GENERATED ALWAYS AS ((json - >> ' updatedAt' )::bigint ) STORED NOT NULL ,
22- updatedBy VARCHAR (256 ) GENERATED ALWAYS AS (json - >> ' updatedBy' ) STORED NOT NULL ,
23- deleted BOOLEAN GENERATED ALWAYS AS ((json - >> ' deleted' )::boolean ) STORED,
24-
25- PRIMARY KEY (id),
26- UNIQUE (nameHash)
27- );
28- CREATE INDEX IF NOT EXISTS idx_context_memory_updated_at ON context_memory (updatedAt);
You can’t perform that action at this time.
0 commit comments