2018-04-23 12:29:27 +02:00
|
|
|
table! {
|
|
|
|
blogs (id) {
|
|
|
|
id -> Int4,
|
|
|
|
actor_id -> Varchar,
|
|
|
|
title -> Varchar,
|
|
|
|
summary -> Text,
|
|
|
|
outbox_url -> Varchar,
|
|
|
|
inbox_url -> Varchar,
|
|
|
|
instance_id -> Int4,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-22 15:35:37 +02:00
|
|
|
table! {
|
|
|
|
instances (id) {
|
|
|
|
id -> Int4,
|
|
|
|
local_domain -> Varchar,
|
|
|
|
public_domain -> Varchar,
|
|
|
|
name -> Varchar,
|
|
|
|
local -> Bool,
|
|
|
|
blocked -> Bool,
|
|
|
|
}
|
|
|
|
}
|
2018-04-22 20:13:12 +02:00
|
|
|
|
|
|
|
table! {
|
|
|
|
users (id) {
|
|
|
|
id -> Int4,
|
|
|
|
username -> Varchar,
|
|
|
|
display_name -> Varchar,
|
|
|
|
outbox_url -> Varchar,
|
|
|
|
inbox_url -> Varchar,
|
|
|
|
is_admin -> Bool,
|
|
|
|
summary -> Text,
|
|
|
|
email -> Nullable<Text>,
|
|
|
|
hashed_password -> Nullable<Text>,
|
|
|
|
instance_id -> Int4,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-23 12:29:27 +02:00
|
|
|
joinable!(blogs -> instances (instance_id));
|
2018-04-22 20:13:12 +02:00
|
|
|
joinable!(users -> instances (instance_id));
|
|
|
|
|
|
|
|
allow_tables_to_appear_in_same_query!(
|
2018-04-23 12:29:27 +02:00
|
|
|
blogs,
|
2018-04-22 20:13:12 +02:00
|
|
|
instances,
|
|
|
|
users,
|
|
|
|
);
|