PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE openmls_sqlite_storage_migrations(
             version int4 PRIMARY KEY,
             name VARCHAR(255),
             applied_on VARCHAR(255),
             checksum VARCHAR(255));
INSERT INTO openmls_sqlite_storage_migrations VALUES(1,'initial','2026-03-10T10:34:47.515202328Z','5121145794404019609');
INSERT INTO openmls_sqlite_storage_migrations VALUES(2,'constraint_addition','2026-03-10T10:34:47.51527263Z','366327680295175235');
CREATE TABLE openmls_encryption_keys (
    provider_version INTEGER NOT NULL,
    public_key BLOB PRIMARY KEY,
    key_pair BLOB NOT NULL
);
CREATE TABLE openmls_epoch_keys_pairs (
    provider_version INTEGER NOT NULL,
    group_id BLOB NOT NULL,
    epoch_id BLOB NOT NULL,
    leaf_index INTEGER NOT NULL,
    key_pairs BLOB NOT NULL,
    PRIMARY KEY (group_id, epoch_id, leaf_index)
);
INSERT INTO openmls_epoch_keys_pairs VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d',X'39',0,X'5b7b227075626c69635f6b6579223a7b226b6579223a7b22766563223a5b392c3133372c3130372c38352c3233302c3233382c3134372c3232382c3136322c38332c3234392c35322c3230322c3136392c3138382c3136362c3234312c3235302c34372c32342c372c372c36322c3137392c3231392c3133322c362c3231302c3132362c38312c35352c37395d7d7d2c22707269766174655f6b6579223a7b226b6579223a7b22766563223a5b34332c3139352c3132352c3131392c38322c3130372c3231362c33312c3230332c34342c36352c36392c3136312c362c3135312c33362c3131372c3232312c3133372c3131352c3138362c3230362c3134392c3231382c36352c3131322c3130302c3233342c3131302c37332c34312c3231325d7d7d7d5d');
CREATE TABLE openmls_key_packages (
    provider_version INTEGER NOT NULL,
    key_package_ref BLOB PRIMARY KEY,
    key_package BLOB NOT NULL
);
CREATE TABLE openmls_own_leaf_nodes (
    provider_version INTEGER NOT NULL,
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    group_id BLOB NOT NULL,
    leaf_node BLOB NOT NULL
);
CREATE TABLE openmls_proposals (
    provider_version INTEGER NOT NULL,
    group_id BLOB NOT NULL,
    proposal_ref BLOB NOT NULL,
    proposal BLOB NOT NULL,
    PRIMARY KEY (group_id, proposal_ref)
);
CREATE TABLE openmls_psks (
    provider_version INTEGER NOT NULL,
    psk_id BLOB PRIMARY KEY,
    psk_bundle BLOB NOT NULL
);
CREATE TABLE openmls_signature_keys (
    provider_version INTEGER NOT NULL,
    public_key BLOB PRIMARY KEY,
    signature_key BLOB NOT NULL
);
INSERT INTO openmls_signature_keys VALUES(1,X'7b2276616c7565223a5b3133322c32332c3130352c31302c37382c37352c3136312c32382c37342c34332c3235342c34312c3131362c3233362c3133312c3234342c3138372c33382c39332c38302c392c37312c31362c3136312c3234352c3134332c342c3134392c31372c3233302c38322c31342c38322c3131372c3131352c3131362c36372c3131342c3132312c3131322c3131362c3131312c38332c3130352c3130332c3131302c39372c3131362c3131372c3131342c3130312c37352c3130312c3132312c382c375d7d',X'7b2270726976617465223a5b3135312c3232352c3234312c35382c3130322c3138312c33372c31332c34342c33322c3133392c3138392c39352c3132342c3131312c3135362c3231382c3230332c39382c3134302c3134312c35312c3232302c3134382c3139322c3231372c3235302c3137392c3130312c3134342c3131312c33365d2c227075626c6963223a5b3133322c32332c3130352c31302c37382c37352c3136312c32382c37342c34332c3235342c34312c3131362c3233362c3133312c3234342c3138372c33382c39332c38302c392c37312c31362c3136312c3234352c3134332c342c3134392c31372c3233302c38322c31345d2c227369676e61747572655f736368656d65223a2245443235353139227d');
CREATE TABLE IF NOT EXISTS "openmls_group_data" (
    provider_version INTEGER NOT NULL,
    group_id BLOB NOT NULL,
    data_type TEXT NOT NULL CHECK (data_type IN (
        'join_group_config', 
        'tree', 
        'interim_transcript_hash',
        'context', 
        'confirmation_tag', 
        'group_state', 
        'message_secrets', 
        'resumption_psk_store',
        'own_leaf_index',
        'use_ratchet_tree_extension',
        'group_epoch_secrets',
        'application_export_tree'
    )),
    group_data BLOB NOT NULL,
    PRIMARY KEY (group_id, data_type)
);
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','own_leaf_index',X'30');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','join_group_config',X'7b22776972655f666f726d61745f706f6c696379223a7b226f7574676f696e67223a22416c7761797343697068657274657874222c22696e636f6d696e67223a22416c7761797343697068657274657874227d2c2270616464696e675f73697a65223a302c226d61785f706173745f65706f636873223a392c226e756d6265725f6f665f726573756d7074696f6e5f70736b73223a302c227573655f726174636865745f747265655f657874656e73696f6e223a66616c73652c2273656e6465725f726174636865745f636f6e66696775726174696f6e223a7b226f75745f6f665f6f726465725f746f6c6572616e6365223a352c226d6178696d756d5f666f72776172645f64697374616e6365223a313030307d7d');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','group_state',X'224f7065726174696f6e616c22');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','tree',X'7b2274726565223a7b226c6561665f6e6f646573223a5b7b226e6f6465223a7b227061796c6f6164223a7b22656e6372797074696f6e5f6b6579223a7b226b6579223a7b22766563223a5b392c3133372c3130372c38352c3233302c3233382c3134372c3232382c3136322c38332c3234392c35322c3230322c3136392c3138382c3136362c3234312c3235302c34372c32342c372c372c36322c3137392c3231392c3133322c362c3231302c3132362c38312c35352c37395d7d7d2c227369676e61747572655f6b6579223a7b2276616c7565223a7b22766563223a5b3133322c32332c3130352c31302c37382c37352c3136312c32382c37342c34332c3235342c34312c3131362c3233362c3133312c3234342c3138372c33382c39332c38302c392c37312c31362c3136312c3234352c3134332c342c3134392c31372c3233302c38322c31345d7d7d2c2263726564656e7469616c223a7b2263726564656e7469616c5f74797065223a224261736963222c2273657269616c697a65645f63726564656e7469616c5f636f6e74656e74223a7b22766563223a5b36352c3130382c3130352c39392c3130315d7d7d2c226361706162696c6974696573223a7b2276657273696f6e73223a5b224d6c733130225d2c22636970686572737569746573223a5b312c322c332c37375d2c22657874656e73696f6e73223a5b5d2c2270726f706f73616c73223a5b5d2c2263726564656e7469616c73223a5b224261736963225d7d2c226c6561665f6e6f64655f736f75726365223a7b22436f6d6d6974223a7b22766563223a5b5d7d7d2c22657874656e73696f6e73223a7b22756e69717565223a5b5d7d7d2c227369676e6174757265223a7b2276616c7565223a7b22766563223a5b32392c3235322c33322c31352c332c31322c3139302c34372c31322c3230332c3135342c35312c39332c3132332c3130372c3139372c32362c3233372c3233312c3232372c33312c3232352c3134312c3232382c3136352c33332c3235342c34332c36302c3134332c35322c3234392c3230322c3234332c33352c3232382c3138352c36302c3139352c3130352c35352c3130342c38352c34332c3230312c3139362c3132382c3139342c3135382c3232322c3231352c3135352c392c3131302c34312c3138382c3134342c31322c36372c3134362c3138382c3234392c3137382c315d7d7d7d7d5d2c22706172656e745f6e6f646573223a5b5d2c2264656661756c745f6c656166223a7b226e6f6465223a6e756c6c7d2c2264656661756c745f706172656e74223a7b226e6f6465223a6e756c6c7d7d2c22747265655f68617368223a5b32312c39332c3135322c362c38332c3132362c32362c3232382c3139352c3136372c3137342c3230372c33342c3232302c3137322c37392c3234352c3135342c3230352c3133392c3230332c3136362c3135372c3232382c3139342c37322c3137372c33352c3134372c3233362c3133352c3139375d7d');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','confirmation_tag',X'7b226d61635f76616c7565223a7b22766563223a5b3137312c3131382c3132302c38372c3139332c3138322c3138312c3132362c3136372c3132342c3131342c3234352c34362c3138362c37342c3136312c37322c3138362c3234302c3137372c3137372c3235352c3137372c3130342c3133332c36392c3138342c3131342c3133392c3131332c35342c3131385d7d7d');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','context',X'7b2270726f746f636f6c5f76657273696f6e223a224d6c733130222c226369706865727375697465223a224d4c535f3132385f44484b454d5832353531395f41455331323847434d5f5348413235365f45643235353139222c2267726f75705f6964223a7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d2c2265706f6368223a392c22747265655f68617368223a7b22766563223a5b32312c39332c3135322c362c38332c3132362c32362c3232382c3139352c3136372c3137342c3230372c33342c3232302c3137322c37392c3234352c3135342c3230352c3133392c3230332c3136362c3135372c3232382c3139342c37322c3137372c33352c3134372c3233362c3133352c3139375d7d2c22636f6e6669726d65645f7472616e7363726970745f68617368223a7b22766563223a5b3232392c35342c3233322c3233322c3139302c39302c38342c3230312c3132322c3233352c32382c34352c3133312c3231392c3130352c3132362c3133302c3132362c3134352c3234332c3133342c3131302c3133352c3138322c3134372c33312c3131392c3131342c39322c35322c3231332c3136375d7d2c22657874656e73696f6e73223a7b22756e69717565223a5b5d7d7d');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','interim_transcript_hash',X'5b38342c3134342c3231322c32382c3131392c3234362c34332c33382c3232362c372c3135302c31352c3138372c35382c302c36302c33302c3130322c3230312c35342c3134392c362c3136312c3132342c3136382c3132342c3233372c3139392c3138352c32302c352c3134305d');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','group_epoch_secrets',X'7b22696e69745f736563726574223a7b22736563726574223a7b2276616c7565223a7b22766563223a5b3232372c3131302c37322c3130342c33382c37362c3231312c35322c3231332c352c3131392c35332c3132312c3231312c37362c3134372c3136312c3139312c3136342c37392c3138342c3233332c35352c32312c3235302c3232322c35332c38302c3232392c3131342c3231302c33325d7d7d7d2c226578706f727465725f736563726574223a7b22736563726574223a7b2276616c7565223a7b22766563223a5b35382c31372c3232332c3130352c37302c3232382c3235312c3137322c3136332c32312c3230312c3131372c3134332c38382c3135312c3136312c3134382c3231342c3132382c3130382c36392c392c3135392c31382c3137342c3134382c32322c3135372c3232392c34302c36322c36315d7d7d7d2c2265706f63685f61757468656e74696361746f72223a7b22736563726574223a7b2276616c7565223a7b22766563223a5b3231382c312c3130352c34352c37382c3230382c3132332c3234352c3231322c3134302c322c37382c3133312c37392c37312c34362c3136302c35352c37312c3235342c3232312c3130382c3235352c3235332c39342c3232392c3230372c36352c37332c3133372c3130382c39365d7d7d7d2c2265787465726e616c5f736563726574223a7b22736563726574223a7b2276616c7565223a7b22766563223a5b3138322c3133342c3235352c3235322c3134302c37312c3130392c3230392c39312c3131382c3137302c3131332c3131332c3135302c3136382c37322c3134352c3139322c3234332c38322c3133342c3137352c39302c3139332c3130342c34332c3231382c38312c3234322c3133332c35352c3231335d7d7d7d2c22726573756d7074696f6e5f70736b223a7b22736563726574223a7b2276616c7565223a7b22766563223a5b3230312c3136312c3231382c37312c37352c3139302c3137342c35302c37392c39342c3233382c3136362c3138342c34312c3230352c3130322c35352c3234312c36392c3130392c342c3133342c35352c3131332c36342c342c37342c35342c34362c3231322c31352c3136305d7d7d7d7d');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','message_secrets',X'[encoded data, 33594 characters]');
INSERT INTO openmls_group_data VALUES(1,X'7b2276616c7565223a7b22766563223a5b3131362c3130312c3131352c3131362c39352c3130332c3131342c3131312c3131372c3131322c39352c3130352c3130305d7d7d','resumption_psk_store',X'7b226d61785f6e756d6265725f6f665f73656372657473223a33322c22726573756d7074696f6e5f70736b223a5b5b302c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3139392c3230392c37302c37372c3232362c33382c35312c3130392c37342c38362c3136362c3235352c32322c36362c35302c37352c38312c32302c3232322c3132362c3133372c3233392c3230302c3139342c32342c36302c3231372c3130322c34352c32342c3134342c3234305d7d7d7d5d2c5b312c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3230342c36302c3134322c39352c38392c33372c3136312c372c31302c34332c3133312c3131362c3230392c3130392c39312c3133362c39352c312c3231332c33352c3131312c3231382c3230322c34362c3134302c3135382c3137382c35362c33332c3135372c3132322c3131305d7d7d7d5d2c5b322c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3138382c36312c3134312c3139342c362c3131352c322c35372c36322c3138342c3130332c3138322c33332c39342c3234302c3234352c3132322c38352c3130392c302c3132332c37362c3138392c3234392c3131302c37362c36312c37322c3131322c3135342c3231312c3130375d7d7d7d5d2c5b332c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3139342c34312c35332c36312c3134312c32352c3136332c3232322c3230332c35342c3134302c3232322c3231312c34392c35372c32352c3135302c3234312c37302c3138382c37372c3133322c3139332c3139302c3230322c3131302c3136372c3231332c3131342c33392c39362c3134385d7d7d7d5d2c5b342c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3139352c38392c3231302c3133312c3133372c38392c39342c3134382c3135302c3136372c382c3133382c3233322c392c3131322c3233362c3230332c38372c38362c35382c37302c3135382c3231312c37322c3136382c3133342c31302c3131322c37312c39352c3132302c33385d7d7d7d5d2c5b352c7b22736563726574223a7b2276616c7565223a7b22766563223a5b36342c3132342c3137392c3231322c31332c3131352c3139332c35332c36302c34302c3235342c3134372c3235302c3130352c3138352c36382c3136342c38302c37352c3138392c39342c37322c39382c3131392c37332c3130322c3136372c35312c37312c3133352c3131342c3232345d7d7d7d5d2c5b362c7b22736563726574223a7b2276616c7565223a7b22766563223a5b35372c36392c3231302c3135302c34302c3134312c3139332c3134392c33322c3139352c352c3233362c3131392c38372c3138362c342c3231372c34322c3131322c3136392c32312c3230382c3139392c39342c3133392c3230352c37342c3230352c35382c3138372c39362c32375d7d7d7d5d2c5b372c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3230302c33382c35322c3234392c3138352c37332c3131362c33352c3231322c35382c3131302c39332c3230342c3133312c3132312c3231342c31392c3130392c33362c36392c37302c37352c382c3137312c362c36332c302c3133382c3138322c3235332c3231372c34395d7d7d7d5d2c5b382c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3137372c3138302c3138312c3137312c3231372c3136382c3138322c3131302c3230322c3130362c39372c31392c372c36382c34352c3137322c3233352c3138382c39372c33342c332c3133362c36392c33302c3232362c38312c35312c3139372c37342c31312c3233302c3135315d7d7d7d5d2c5b392c7b22736563726574223a7b2276616c7565223a7b22766563223a5b3230312c3136312c3231382c37312c37352c3139302c3137342c35302c37392c39342c3233382c3136362c3138342c34312c3230352c3130322c35352c3234312c36392c3130392c342c3133342c35352c3131332c36342c342c37342c35342c34362c3231322c31352c3136305d7d7d7d5d5d2c22637572736f72223a31307d');
DELETE FROM sqlite_sequence;
COMMIT;

