Added first draft of versions to schema

This commit is contained in:
Jef Roosens 2021-12-23 16:28:43 +01:00
parent b83ea9796b
commit fb38a1c1bf
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
4 changed files with 107 additions and 27 deletions

View file

@ -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,
);