Skip to main content

xmtp_db/encrypted_store/
schema_gen.rs

1// @generated automatically by Diesel CLI.
2
3diesel::table! {
4    association_state (inbox_id, sequence_id) {
5        inbox_id -> Text,
6        sequence_id -> BigInt,
7        state -> Binary,
8    }
9}
10
11diesel::table! {
12    consent_records (entity_type, entity) {
13        entity_type -> Integer,
14        state -> Integer,
15        entity -> Text,
16        consented_at_ns -> BigInt,
17    }
18}
19
20diesel::table! {
21    group_intents (id) {
22        id -> Integer,
23        kind -> Integer,
24        group_id -> Binary,
25        data -> Binary,
26        state -> Integer,
27        payload_hash -> Nullable<Binary>,
28        post_commit_data -> Nullable<Binary>,
29        publish_attempts -> Integer,
30        staged_commit -> Nullable<Binary>,
31        published_in_epoch -> Nullable<BigInt>,
32        should_push -> Bool,
33        sequence_id -> Nullable<BigInt>,
34        prepared_envelopes -> Nullable<Binary>,
35    }
36}
37
38diesel::table! {
39    group_messages (id) {
40        id -> Binary,
41        group_id -> Binary,
42        decrypted_message_bytes -> Binary,
43        sent_at_ns -> BigInt,
44        kind -> Integer,
45        sender_installation_id -> Binary,
46        sender_inbox_id -> Text,
47        delivery_status -> Integer,
48        content_type -> Integer,
49        version_major -> Integer,
50        version_minor -> Integer,
51        authority_id -> Text,
52        reference_id -> Nullable<Binary>,
53        sequence_id -> BigInt,
54        envelope_hash -> Nullable<Binary>,
55        expiry_ns -> Nullable<BigInt>,
56        inserted_at_ns -> BigInt,
57        expire_at_ns -> Nullable<BigInt>,
58        should_push -> Bool,
59        idempotency_key -> Text,
60        delivery_sequence -> Nullable<BigInt>,
61    }
62}
63
64diesel::table! {
65    group_welcome_discovery (group_id) {
66        group_id -> Binary,
67        first_welcome_sequence_id -> BigInt,
68    }
69}
70
71diesel::table! {
72    groups (id) {
73        id -> Binary,
74        created_at_ns -> BigInt,
75        membership_state -> Integer,
76        installations_last_checked -> BigInt,
77        added_by_inbox_id -> Text,
78        sequence_id -> Nullable<BigInt>,
79        rotated_at_ns -> BigInt,
80        conversation_type -> Integer,
81        dm_id -> Nullable<Text>,
82        last_message_ns -> Nullable<BigInt>,
83        message_disappear_from_ns -> Nullable<BigInt>,
84        message_disappear_in_ns -> Nullable<BigInt>,
85        paused_for_version -> Nullable<Text>,
86        maybe_forked -> Bool,
87        fork_details -> Text,
88        should_publish_commit_log -> Bool,
89        commit_log_public_key -> Nullable<Binary>,
90        is_commit_log_forked -> Nullable<Bool>,
91        has_pending_leave_request -> Nullable<Bool>,
92        push_override -> Nullable<Integer>,
93    }
94}
95
96diesel::table! {
97    identity (rowid) {
98        inbox_id -> Text,
99        installation_keys -> Binary,
100        credential_bytes -> Binary,
101        rowid -> Nullable<Integer>,
102        next_key_package_rotation_ns -> Nullable<BigInt>,
103        registration_cursor_sequence_id -> Nullable<BigInt>,
104    }
105}
106
107diesel::table! {
108    identity_cache (identity, identity_kind) {
109        inbox_id -> Text,
110        identity -> Text,
111        identity_kind -> Integer,
112    }
113}
114
115diesel::table! {
116    identity_updates (inbox_id, sequence_id) {
117        inbox_id -> Text,
118        sequence_id -> BigInt,
119        server_timestamp_ns -> BigInt,
120        payload -> Binary,
121    }
122}
123
124diesel::table! {
125    incoming_envelopes (entity_id, entity_kind, sequence_id) {
126        entity_id -> Binary,
127        entity_kind -> Integer,
128        sequence_id -> BigInt,
129        envelope -> Binary,
130        retry_at_ns -> BigInt,
131        blocked -> Bool,
132        error_code -> Nullable<Text>,
133        retry_expires_at_ns -> Nullable<BigInt>,
134    }
135}
136
137diesel::table! {
138    key_package_history (id) {
139        id -> Integer,
140        key_package_hash_ref -> Binary,
141        created_at_ns -> BigInt,
142        delete_at_ns -> Nullable<BigInt>,
143        post_quantum_public_key -> Nullable<Binary>,
144        published_sequence_id -> Nullable<BigInt>,
145    }
146}
147
148diesel::table! {
149    local_commit_log (rowid) {
150        rowid -> Integer,
151        group_id -> Binary,
152        commit_sequence_id -> BigInt,
153        last_epoch_authenticator -> Binary,
154        commit_result -> Integer,
155        applied_epoch_number -> BigInt,
156        applied_epoch_authenticator -> Binary,
157        error_message -> Nullable<Text>,
158        sender_inbox_id -> Nullable<Text>,
159        sender_installation_id -> Nullable<Binary>,
160        commit_type -> Nullable<Text>,
161    }
162}
163
164diesel::table! {
165    message_deletions (id) {
166        id -> Binary,
167        group_id -> Binary,
168        deleted_message_id -> Binary,
169        deleted_by_inbox_id -> Text,
170        is_super_admin_deletion -> Bool,
171        deleted_at_ns -> BigInt,
172    }
173}
174
175diesel::table! {
176    openmls_key_store (key_bytes) {
177        key_bytes -> Binary,
178        value_bytes -> Binary,
179    }
180}
181
182diesel::table! {
183    openmls_key_value (version, key_bytes) {
184        version -> Integer,
185        key_bytes -> Binary,
186        value_bytes -> Binary,
187    }
188}
189
190diesel::table! {
191    pending_remove (group_id, inbox_id) {
192        group_id -> Binary,
193        inbox_id -> Text,
194        message_id -> Binary,
195    }
196}
197
198diesel::table! {
199    processed_device_sync_messages (message_id) {
200        message_id -> Binary,
201        attempts -> Integer,
202        state -> Integer,
203    }
204}
205
206diesel::table! {
207    push_uploaded_topic (topic) {
208        topic -> Binary,
209        hmac_epoch_base -> Nullable<BigInt>,
210        include_commits -> Bool,
211        root_key_fingerprint -> Binary,
212        stale -> Bool,
213    }
214}
215
216diesel::table! {
217    readd_status (group_id, installation_id) {
218        group_id -> Binary,
219        installation_id -> Binary,
220        requested_at_sequence_id -> Nullable<BigInt>,
221        responded_at_sequence_id -> Nullable<BigInt>,
222    }
223}
224
225diesel::table! {
226    refresh_state (entity_id, entity_kind) {
227        entity_id -> Binary,
228        entity_kind -> Integer,
229        sequence_id -> BigInt,
230        received_sequence_id -> Nullable<BigInt>,
231        last_rejection_sequence_id -> Nullable<BigInt>,
232        last_rejection_code -> Nullable<Text>,
233    }
234}
235
236diesel::table! {
237    remote_commit_log (rowid) {
238        rowid -> Integer,
239        log_sequence_id -> BigInt,
240        group_id -> Binary,
241        commit_sequence_id -> BigInt,
242        commit_result -> Integer,
243        applied_epoch_number -> BigInt,
244        applied_epoch_authenticator -> Binary,
245    }
246}
247
248diesel::table! {
249    server_configuration (id) {
250        id -> Integer,
251        identifier -> Text,
252        backend_url -> Text,
253        response -> Binary,
254        fetched_at_ns -> BigInt,
255        conflicting_identifier -> Nullable<Text>,
256    }
257}
258
259diesel::table! {
260    tasks (id) {
261        id -> Integer,
262        originating_message_sequence_id -> BigInt,
263        created_at_ns -> BigInt,
264        expires_at_ns -> BigInt,
265        attempts -> Integer,
266        max_attempts -> Integer,
267        last_attempted_at_ns -> BigInt,
268        backoff_scaling_factor -> Float,
269        max_backoff_duration_ns -> BigInt,
270        initial_backoff_duration_ns -> BigInt,
271        next_attempt_at_ns -> BigInt,
272        data_hash -> Binary,
273        data -> Binary,
274    }
275}
276
277diesel::table! {
278    user_preferences (id) {
279        id -> Integer,
280        hmac_key -> Nullable<Binary>,
281        hmac_key_cycled_at_ns -> Nullable<BigInt>,
282        dm_group_updates_migrated -> Bool,
283        stream_database_id -> Binary,
284        delivery_owner -> Nullable<Binary>,
285        delivery_owner_until_ns -> Nullable<BigInt>,
286        push_recipient_id -> Nullable<Binary>,
287        push_recipient_secret -> Nullable<Binary>,
288        push_state -> Integer,
289        push_failed_error -> Nullable<Binary>,
290        push_config -> Nullable<Binary>,
291        push_deadlines -> Nullable<Binary>,
292        push_last_state -> Nullable<Binary>,
293        push_repairing -> Bool,
294        push_generation -> BigInt,
295        push_suppressed -> Nullable<Binary>,
296    }
297}
298
299diesel::joinable!(group_intents -> groups (group_id));
300diesel::joinable!(group_messages -> groups (group_id));
301diesel::joinable!(group_welcome_discovery -> groups (group_id));
302diesel::joinable!(message_deletions -> group_messages (id));
303
304diesel::allow_tables_to_appear_in_same_query!(
305    association_state,
306    consent_records,
307    group_intents,
308    group_messages,
309    group_welcome_discovery,
310    groups,
311    identity,
312    identity_cache,
313    identity_updates,
314    incoming_envelopes,
315    key_package_history,
316    local_commit_log,
317    message_deletions,
318    openmls_key_store,
319    openmls_key_value,
320    pending_remove,
321    processed_device_sync_messages,
322    push_uploaded_topic,
323    readd_status,
324    refresh_state,
325    remote_commit_log,
326    server_configuration,
327    tasks,
328    user_preferences,
329);