feat(storage): add native MySQL namespace and identity pilots
Add resumable checked migrations and explicit schema administration commands. Port ML budgets, namespaces, identity and group persistence with three-backend contracts. Keep MySQL unavailable as the full application backend.
This commit is contained in:
1 parent
0c7897d695
commit
6a67fd9afe
40 files changed
+3087
-94
No files matched your search
@@ -0,0 +1,25 @@
|
||||
-- Native MySQL ML component schema. Applied only by the journaled runner.
|
||||
CREATE TABLE config (
|
||||
domain_uuid VARCHAR(36) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
`key` VARCHAR(128) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
value LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
|
||||
updated_at BIGINT NOT NULL,
|
||||
PRIMARY KEY(domain_uuid,`key`)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE ml_daily_budget (
|
||||
domain_uuid VARCHAR(36) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
day CHAR(10) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
reserved_bytes BIGINT NOT NULL CHECK(reserved_bytes>=0),
|
||||
PRIMARY KEY(domain_uuid,day)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE ml_budget_receipts (
|
||||
domain_uuid VARCHAR(36) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
request_uuid VARCHAR(36) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
day CHAR(10) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
input_hash CHAR(64) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
generation VARCHAR(36) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||
reserved_bytes BIGINT NOT NULL CHECK(reserved_bytes>0),
|
||||
state VARCHAR(16) CHARACTER SET ascii COLLATE ascii_bin NOT NULL CHECK(state IN ('reserved','completed','unknown')),
|
||||
actual_tokens BIGINT NOT NULL DEFAULT 0 CHECK(actual_tokens>=0),
|
||||
PRIMARY KEY(domain_uuid,request_uuid)
|
||||
) ENGINE=InnoDB;
|
||||
Reference in new issue
Block a user