2018-02-15 00:40:34 +01:00
|
|
|
table! {
|
|
|
|
attachments (id) {
|
2019-05-20 21:12:41 +02:00
|
|
|
id -> Varchar,
|
|
|
|
cipher_uuid -> Varchar,
|
2018-02-15 00:40:34 +01:00
|
|
|
file_name -> Text,
|
|
|
|
file_size -> Integer,
|
2019-05-20 21:12:41 +02:00
|
|
|
akey -> Nullable<Text>,
|
2018-02-15 00:40:34 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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,
|
2018-03-06 00:02:36 +01:00
|
|
|
name -> Text,
|
|
|
|
notes -> Nullable<Text>,
|
|
|
|
fields -> Nullable<Text>,
|
2018-02-10 01:00:55 +01:00
|
|
|
data -> Text,
|
|
|
|
favorite -> Bool,
|
2018-08-27 23:08:58 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-17 22:30:19 +01:00
|
|
|
table! {
|
|
|
|
collections (uuid) {
|
2019-05-20 21:12:41 +02:00
|
|
|
uuid -> Varchar,
|
|
|
|
org_uuid -> Varchar,
|
2018-02-17 22:30:19 +01:00
|
|
|
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,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-04 20:10:35 +02:00
|
|
|
table! {
|
|
|
|
folders_ciphers (cipher_uuid, folder_uuid) {
|
2019-05-20 21:12:41 +02:00
|
|
|
cipher_uuid -> Varchar,
|
|
|
|
folder_uuid -> Varchar,
|
2018-05-04 20:10:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-19 17:30:14 +02:00
|
|
|
table! {
|
|
|
|
invitations (email) {
|
2019-05-20 21:12:41 +02:00
|
|
|
email -> Varchar,
|
2018-09-19 17:30:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-17 22:30:19 +01:00
|
|
|
table! {
|
|
|
|
organizations (uuid) {
|
2019-05-20 21:12:41 +02:00
|
|
|
uuid -> Varchar,
|
2018-02-17 22:30:19 +01:00
|
|
|
name -> Text,
|
|
|
|
billing_email -> Text,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-12 21:46:50 +02:00
|
|
|
table! {
|
|
|
|
twofactor (uuid) {
|
2019-05-20 21:12:41 +02:00
|
|
|
uuid -> Varchar,
|
|
|
|
user_uuid -> Varchar,
|
|
|
|
atype -> Integer,
|
2018-07-12 21:46:50 +02:00
|
|
|
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,
|
2018-02-15 00:40:34 +01:00
|
|
|
equivalent_domains -> Text,
|
|
|
|
excluded_globals -> Text,
|
2018-09-19 17:30:14 +02:00
|
|
|
client_kdf_type -> Integer,
|
|
|
|
client_kdf_iter -> Integer,
|
2018-09-10 15:51:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-17 22:30:19 +01:00
|
|
|
table! {
|
|
|
|
users_collections (user_uuid, collection_uuid) {
|
2019-05-20 21:12:41 +02:00
|
|
|
user_uuid -> Varchar,
|
|
|
|
collection_uuid -> Varchar,
|
2018-05-04 20:10:35 +02:00
|
|
|
read_only -> Bool,
|
2018-02-17 22:30:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
table! {
|
2018-04-24 22:01:55 +02:00
|
|
|
users_organizations (uuid) {
|
2019-05-20 21:12:41 +02:00
|
|
|
uuid -> Varchar,
|
|
|
|
user_uuid -> Varchar,
|
|
|
|
org_uuid -> Varchar,
|
2018-04-24 22:01:55 +02:00
|
|
|
access_all -> Bool,
|
2019-05-20 21:12:41 +02:00
|
|
|
akey -> Text,
|
2018-02-17 22:30:19 +01:00
|
|
|
status -> Integer,
|
2019-05-20 21:12:41 +02:00
|
|
|
atype -> Integer,
|
2018-02-17 22:30:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-10 01:00:55 +01:00
|
|
|
allow_tables_to_appear_in_same_query!(
|
2018-02-15 00:40:34 +01:00
|
|
|
attachments,
|
2018-02-10 01:00:55 +01:00
|
|
|
ciphers,
|
2018-06-01 15:08:03 +02:00
|
|
|
ciphers_collections,
|
2018-02-17 22:30:19 +01:00
|
|
|
collections,
|
2018-02-10 01:00:55 +01:00
|
|
|
devices,
|
|
|
|
folders,
|
2018-05-04 20:10:35 +02:00
|
|
|
folders_ciphers,
|
2018-09-19 17:30:14 +02:00
|
|
|
invitations,
|
2018-02-17 22:30:19 +01:00
|
|
|
organizations,
|
2018-07-12 21:46:50 +02:00
|
|
|
twofactor,
|
2018-02-10 01:00:55 +01:00
|
|
|
users,
|
2018-02-17 22:30:19 +01:00
|
|
|
users_collections,
|
|
|
|
users_organizations,
|
2018-02-10 01:00:55 +01:00
|
|
|
);
|