vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

schema.rs (4598B)


      1 table! {
      2     ciphers (uuid) {
      3         uuid -> Text,
      4         created_at -> Timestamp,
      5         updated_at -> Timestamp,
      6         user_uuid -> Nullable<Text>,
      7         organization_uuid -> Nullable<Text>,
      8         key -> Nullable<Text>,
      9         atype -> Integer,
     10         name -> Text,
     11         notes -> Nullable<Text>,
     12         fields -> Nullable<Text>,
     13         data -> Text,
     14         password_history -> Nullable<Text>,
     15         deleted_at -> Nullable<Timestamp>,
     16         reprompt -> Nullable<Integer>,
     17     }
     18 }
     19 table! {
     20     ciphers_collections (cipher_uuid, collection_uuid) {
     21         cipher_uuid -> Text,
     22         collection_uuid -> Text,
     23     }
     24 }
     25 
     26 table! {
     27     collections (uuid) {
     28         uuid -> Text,
     29         org_uuid -> Text,
     30         name -> Text,
     31         external_id -> Nullable<Text>,
     32     }
     33 }
     34 table! {
     35     devices (uuid, user_uuid) {
     36         uuid -> Text,
     37         created_at -> Timestamp,
     38         updated_at -> Timestamp,
     39         user_uuid -> Text,
     40         name -> Text,
     41         atype -> Integer,
     42         push_uuid -> Nullable<Text>,
     43         push_token -> Nullable<Text>,
     44         refresh_token -> Text,
     45         twofactor_remember -> Nullable<Text>,
     46     }
     47 }
     48 
     49 table! {
     50     favorites (user_uuid, cipher_uuid) {
     51         user_uuid -> Text,
     52         cipher_uuid -> Text,
     53     }
     54 }
     55 
     56 table! {
     57     folders (uuid) {
     58         uuid -> Text,
     59         created_at -> Timestamp,
     60         updated_at -> Timestamp,
     61         user_uuid -> Text,
     62         name -> Text,
     63     }
     64 }
     65 
     66 table! {
     67     folders_ciphers (cipher_uuid, folder_uuid) {
     68         cipher_uuid -> Text,
     69         folder_uuid -> Text,
     70     }
     71 }
     72 
     73 table! {
     74     org_policies (uuid) {
     75         uuid -> Text,
     76         org_uuid -> Text,
     77         atype -> Integer,
     78         enabled -> Bool,
     79         data -> Text,
     80     }
     81 }
     82 
     83 table! {
     84     organizations (uuid) {
     85         uuid -> Text,
     86         name -> Text,
     87         billing_email -> Text,
     88         private_key -> Nullable<Text>,
     89         public_key -> Nullable<Text>,
     90     }
     91 }
     92 
     93 table! {
     94     totp (user_uuid) {
     95         user_uuid -> Text,
     96         token -> Text,
     97         last_used -> BigInt,
     98     }
     99 }
    100 
    101 table! {
    102     users (uuid) {
    103         uuid -> Text,
    104         enabled -> Bool,
    105         created_at -> Timestamp,
    106         updated_at -> Timestamp,
    107         verified_at -> Nullable<Timestamp>,
    108         last_verifying_at -> Nullable<Timestamp>,
    109         login_verify_count -> Integer,
    110         email -> Text,
    111         email_new -> Nullable<Text>,
    112         email_new_token -> Nullable<Text>,
    113         name -> Text,
    114         password_hash -> Binary,
    115         salt -> Binary,
    116         password_iterations -> Integer,
    117         password_hint -> Nullable<Text>,
    118         akey -> Text,
    119         private_key -> Nullable<Text>,
    120         public_key -> Nullable<Text>,
    121         totp_secret -> Nullable<Text>,
    122         totp_recover -> Nullable<Text>,
    123         security_stamp -> Text,
    124         stamp_exception -> Nullable<Text>,
    125         equivalent_domains -> Text,
    126         excluded_globals -> Text,
    127         client_kdf_type -> Integer,
    128         client_kdf_iter -> Integer,
    129         client_kdf_memory -> Nullable<Integer>,
    130         client_kdf_parallelism -> Nullable<Integer>,
    131         api_key -> Nullable<Text>,
    132         avatar_color -> Nullable<Text>,
    133         external_id -> Nullable<Text>,
    134     }
    135 }
    136 
    137 table! {
    138     users_collections (user_uuid, collection_uuid) {
    139         user_uuid -> Text,
    140         collection_uuid -> Text,
    141         read_only -> Bool,
    142         hide_passwords -> Bool,
    143     }
    144 }
    145 
    146 table! {
    147     users_organizations (uuid) {
    148         uuid -> Text,
    149         user_uuid -> Text,
    150         org_uuid -> Text,
    151         access_all -> Bool,
    152         akey -> Text,
    153         status -> Integer,
    154         atype -> Integer,
    155         reset_password_key -> Nullable<Text>,
    156         external_id -> Nullable<Text>,
    157     }
    158 }
    159 
    160 table! {
    161     webauthn (credential_id) {
    162         credential_id -> Binary,
    163         transports -> SmallInt,
    164         user_uuid -> Text,
    165         ed25519_key -> Nullable<Binary>,
    166         p256_x -> Nullable<Binary>,
    167         p256_y_is_odd -> Nullable<Bool>,
    168         p384_x -> Nullable<Binary>,
    169         p384_y_is_odd -> Nullable<Bool>,
    170         rsa_n -> Nullable<Binary>,
    171         rsa_e -> Nullable<Integer>,
    172         cred_protect -> SmallInt,
    173         hmac_secret -> Nullable<Bool>,
    174         dynamic_state -> Binary,
    175         metadata -> Text,
    176         id -> BigInt,
    177         name -> Text,
    178     }
    179 }
    180 joinable!(folders_ciphers -> ciphers (cipher_uuid));
    181 joinable!(folders_ciphers -> folders (folder_uuid));
    182 allow_tables_to_appear_in_same_query!(
    183     ciphers,
    184     ciphers_collections,
    185     collections,
    186     folders,
    187     folders_ciphers,
    188     org_policies,
    189     users_collections,
    190     users_organizations,
    191 );