Added first draft of versions to schema
This commit is contained in:
parent
b83ea9796b
commit
fb38a1c1bf
4 changed files with 107 additions and 27 deletions
|
|
@ -2,9 +2,8 @@ table! {
|
|||
posts (id) {
|
||||
id -> Uuid,
|
||||
section_id -> Uuid,
|
||||
title -> Nullable<Varchar>,
|
||||
publish_date -> Date,
|
||||
content -> Text,
|
||||
is_private -> Bool,
|
||||
is_archived -> Bool,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -16,12 +15,26 @@ table! {
|
|||
description -> Nullable<Text>,
|
||||
is_default -> Bool,
|
||||
has_titles -> Bool,
|
||||
is_private -> Bool,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
versions (id) {
|
||||
id -> Uuid,
|
||||
post_id -> Uuid,
|
||||
title -> Nullable<Varchar>,
|
||||
publish_date -> Nullable<Date>,
|
||||
content -> Text,
|
||||
is_draft -> Bool,
|
||||
}
|
||||
}
|
||||
|
||||
joinable!(posts -> sections (section_id));
|
||||
joinable!(versions -> posts (post_id));
|
||||
|
||||
allow_tables_to_appear_in_same_query!(
|
||||
posts,
|
||||
sections,
|
||||
versions,
|
||||
);
|
||||
|
|
|
|||
Reference in a new issue