0
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden synced 2024-11-15 22:42:51 +01:00
bitwarden_rs/src/db/schema.rs

157 lines
3.1 KiB
Rust
Raw Normal View History

table! {
attachments (id) {
2019-05-20 21:12:41 +02:00
id -> Varchar,
cipher_uuid -> Varchar,
file_name -> Text,
file_size -> Integer,
2019-05-20 21:12:41 +02:00
akey -> Nullable<Text>,
}
}
2018-02-10 01:00:55 +01:00
table! {
ciphers (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
created_at -> Datetime,
updated_at -> Datetime,
user_uuid -> Nullable<Varchar>,
organization_uuid -> Nullable<Varchar>,
atype -> Integer,
name -> Text,
notes -> Nullable<Text>,
fields -> Nullable<Text>,
2018-02-10 01:00:55 +01:00
data -> Text,
favorite -> Bool,
password_history -> Nullable<Text>,
2018-02-10 01:00:55 +01:00
}
}
2018-06-01 15:08:03 +02:00
table! {
ciphers_collections (cipher_uuid, collection_uuid) {
2019-05-20 21:12:41 +02:00
cipher_uuid -> Varchar,
collection_uuid -> Varchar,
2018-06-01 15:08:03 +02:00
}
}
table! {
collections (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
org_uuid -> Varchar,
name -> Text,
}
}
2018-02-10 01:00:55 +01:00
table! {
devices (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
created_at -> Datetime,
updated_at -> Datetime,
user_uuid -> Varchar,
2018-02-10 01:00:55 +01:00
name -> Text,
2019-05-20 21:12:41 +02:00
atype -> Integer,
2018-02-10 01:00:55 +01:00
push_token -> Nullable<Text>,
refresh_token -> Text,
2018-06-01 15:08:03 +02:00
twofactor_remember -> Nullable<Text>,
2018-02-10 01:00:55 +01:00
}
}
table! {
folders (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
created_at -> Datetime,
updated_at -> Datetime,
user_uuid -> Varchar,
2018-02-10 01:00:55 +01:00
name -> Text,
}
}
table! {
folders_ciphers (cipher_uuid, folder_uuid) {
2019-05-20 21:12:41 +02:00
cipher_uuid -> Varchar,
folder_uuid -> Varchar,
}
}
table! {
invitations (email) {
2019-05-20 21:12:41 +02:00
email -> Varchar,
}
}
table! {
organizations (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
name -> Text,
billing_email -> Text,
}
}
table! {
twofactor (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
user_uuid -> Varchar,
atype -> Integer,
enabled -> Bool,
data -> Text,
}
}
2018-02-10 01:00:55 +01:00
table! {
users (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
created_at -> Datetime,
updated_at -> Datetime,
email -> Varchar,
2018-02-10 01:00:55 +01:00
name -> Text,
2019-05-20 21:12:41 +02:00
password_hash -> Blob,
salt -> Blob,
2018-02-10 01:00:55 +01:00
password_iterations -> Integer,
password_hint -> Nullable<Text>,
2019-05-20 21:12:41 +02:00
akey -> Text,
2018-02-10 01:00:55 +01:00
private_key -> Nullable<Text>,
public_key -> Nullable<Text>,
totp_secret -> Nullable<Text>,
totp_recover -> Nullable<Text>,
security_stamp -> Text,
equivalent_domains -> Text,
excluded_globals -> Text,
client_kdf_type -> Integer,
client_kdf_iter -> Integer,
}
}
table! {
users_collections (user_uuid, collection_uuid) {
2019-05-20 21:12:41 +02:00
user_uuid -> Varchar,
collection_uuid -> Varchar,
read_only -> Bool,
}
}
table! {
users_organizations (uuid) {
2019-05-20 21:12:41 +02:00
uuid -> Varchar,
user_uuid -> Varchar,
org_uuid -> Varchar,
access_all -> Bool,
2019-05-20 21:12:41 +02:00
akey -> Text,
status -> Integer,
2019-05-20 21:12:41 +02:00
atype -> Integer,
}
}
2018-02-10 01:00:55 +01:00
allow_tables_to_appear_in_same_query!(
attachments,
2018-02-10 01:00:55 +01:00
ciphers,
2018-06-01 15:08:03 +02:00
ciphers_collections,
collections,
2018-02-10 01:00:55 +01:00
devices,
folders,
folders_ciphers,
invitations,
organizations,
twofactor,
2018-02-10 01:00:55 +01:00
users,
users_collections,
users_organizations,
2018-02-10 01:00:55 +01:00
);