Commit 63f1f5d
committed
Fix MySQL key length limit in metadata table migration
Annotations table used key VARCHAR(1000) with a unique index on
(resource_guid, key), totaling 5020 bytes in utf8mb4 — exceeding
MySQL's 3072-byte max key length.
Align with codebase convention established in migration
20240102150000: use key_name VARCHAR(63) with a three-column unique
index on (resource_guid, key_prefix, key_name). Also add NOT NULL
default '' to key_prefix on both labels and annotations tables.1 parent a5ab35b commit 63f1f5d
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments