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        originator_id -> Nullable<BigInt>,
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        originator_id -> BigInt,
54        sequence_id -> BigInt,
55        inserted_at_ns -> BigInt,
56        expire_at_ns -> Nullable<BigInt>,
57        should_push -> Bool,
58    }
59}
60
61diesel::table! {
62    groups (id) {
63        id -> Binary,
64        created_at_ns -> BigInt,
65        membership_state -> Integer,
66        installations_last_checked -> BigInt,
67        added_by_inbox_id -> Text,
68        sequence_id -> Nullable<BigInt>,
69        rotated_at_ns -> BigInt,
70        conversation_type -> Integer,
71        dm_id -> Nullable<Text>,
72        last_message_ns -> Nullable<BigInt>,
73        message_disappear_from_ns -> Nullable<BigInt>,
74        message_disappear_in_ns -> Nullable<BigInt>,
75        paused_for_version -> Nullable<Text>,
76        maybe_forked -> Bool,
77        fork_details -> Text,
78        originator_id -> Nullable<BigInt>,
79        should_publish_commit_log -> Bool,
80        commit_log_public_key -> Nullable<Binary>,
81        is_commit_log_forked -> Nullable<Bool>,
82        has_pending_leave_request -> Nullable<Bool>,
83    }
84}
85
86diesel::table! {
87    icebox (originator_id, sequence_id) {
88        originator_id -> BigInt,
89        sequence_id -> BigInt,
90        group_id -> Binary,
91        envelope_payload -> Binary,
92    }
93}
94
95diesel::table! {
96    icebox_dependencies (envelope_originator_id, envelope_sequence_id, dependency_originator_id, dependency_sequence_id) {
97        envelope_originator_id -> BigInt,
98        envelope_sequence_id -> BigInt,
99        dependency_originator_id -> BigInt,
100        dependency_sequence_id -> BigInt,
101    }
102}
103
104diesel::table! {
105    identity (rowid) {
106        inbox_id -> Text,
107        installation_keys -> Binary,
108        credential_bytes -> Binary,
109        rowid -> Nullable<Integer>,
110        next_key_package_rotation_ns -> Nullable<BigInt>,
111    }
112}
113
114diesel::table! {
115    identity_cache (identity, identity_kind) {
116        inbox_id -> Text,
117        identity -> Text,
118        identity_kind -> Integer,
119    }
120}
121
122diesel::table! {
123    identity_updates (inbox_id, sequence_id) {
124        inbox_id -> Text,
125        sequence_id -> BigInt,
126        server_timestamp_ns -> BigInt,
127        payload -> Binary,
128        originator_id -> Integer,
129    }
130}
131
132diesel::table! {
133    key_package_history (id) {
134        id -> Integer,
135        key_package_hash_ref -> Binary,
136        created_at_ns -> BigInt,
137        delete_at_ns -> Nullable<BigInt>,
138        post_quantum_public_key -> Nullable<Binary>,
139    }
140}
141
142diesel::table! {
143    local_commit_log (rowid) {
144        rowid -> Integer,
145        group_id -> Binary,
146        commit_sequence_id -> BigInt,
147        last_epoch_authenticator -> Binary,
148        commit_result -> Integer,
149        applied_epoch_number -> BigInt,
150        applied_epoch_authenticator -> Binary,
151        error_message -> Nullable<Text>,
152        sender_inbox_id -> Nullable<Text>,
153        sender_installation_id -> Nullable<Binary>,
154        commit_type -> Nullable<Text>,
155    }
156}
157
158diesel::table! {
159    message_deletions (id) {
160        id -> Binary,
161        group_id -> Binary,
162        deleted_message_id -> Binary,
163        deleted_by_inbox_id -> Text,
164        is_super_admin_deletion -> Bool,
165        deleted_at_ns -> BigInt,
166    }
167}
168
169diesel::table! {
170    openmls_key_store (key_bytes) {
171        key_bytes -> Binary,
172        value_bytes -> Binary,
173    }
174}
175
176diesel::table! {
177    openmls_key_value (version, key_bytes) {
178        version -> Integer,
179        key_bytes -> Binary,
180        value_bytes -> Binary,
181    }
182}
183
184diesel::table! {
185    pending_remove (group_id, inbox_id) {
186        group_id -> Binary,
187        inbox_id -> Text,
188        message_id -> Binary,
189    }
190}
191
192diesel::table! {
193    processed_device_sync_messages (message_id) {
194        message_id -> Binary,
195        attempts -> Integer,
196        state -> Integer,
197    }
198}
199
200diesel::table! {
201    readd_status (group_id, installation_id) {
202        group_id -> Binary,
203        installation_id -> Binary,
204        requested_at_sequence_id -> Nullable<BigInt>,
205        responded_at_sequence_id -> Nullable<BigInt>,
206    }
207}
208
209diesel::table! {
210    refresh_state (entity_id, entity_kind, originator_id) {
211        entity_id -> Binary,
212        entity_kind -> Integer,
213        sequence_id -> BigInt,
214        originator_id -> Integer,
215    }
216}
217
218diesel::table! {
219    remote_commit_log (rowid) {
220        rowid -> Integer,
221        log_sequence_id -> BigInt,
222        group_id -> Binary,
223        commit_sequence_id -> BigInt,
224        commit_result -> Integer,
225        applied_epoch_number -> BigInt,
226        applied_epoch_authenticator -> Binary,
227    }
228}
229
230diesel::table! {
231    tasks (id) {
232        id -> Integer,
233        originating_message_sequence_id -> BigInt,
234        originating_message_originator_id -> Integer,
235        created_at_ns -> BigInt,
236        expires_at_ns -> BigInt,
237        attempts -> Integer,
238        max_attempts -> Integer,
239        last_attempted_at_ns -> BigInt,
240        backoff_scaling_factor -> Float,
241        max_backoff_duration_ns -> BigInt,
242        initial_backoff_duration_ns -> BigInt,
243        next_attempt_at_ns -> BigInt,
244        data_hash -> Binary,
245        data -> Binary,
246    }
247}
248
249diesel::table! {
250    user_preferences (id) {
251        id -> Integer,
252        hmac_key -> Nullable<Binary>,
253        hmac_key_cycled_at_ns -> Nullable<BigInt>,
254        dm_group_updates_migrated -> Bool,
255    }
256}
257
258diesel::joinable!(group_intents -> groups (group_id));
259diesel::joinable!(group_messages -> groups (group_id));
260diesel::joinable!(icebox -> groups (group_id));
261diesel::joinable!(message_deletions -> group_messages (id));
262
263diesel::allow_tables_to_appear_in_same_query!(
264    association_state,
265    consent_records,
266    group_intents,
267    group_messages,
268    groups,
269    icebox,
270    icebox_dependencies,
271    identity,
272    identity_cache,
273    identity_updates,
274    key_package_history,
275    local_commit_log,
276    message_deletions,
277    openmls_key_store,
278    openmls_key_value,
279    pending_remove,
280    processed_device_sync_messages,
281    readd_status,
282    refresh_state,
283    remote_commit_log,
284    tasks,
285    user_preferences,
286);