Added first draft database schema
All checks were successful
continuous-integration/drone the build was successful
All checks were successful
continuous-integration/drone the build was successful
This commit is contained in:
parent
02fe8d2de7
commit
8de1efcd7f
3 changed files with 71 additions and 0 deletions
33
src/schema.rs
Normal file
33
src/schema.rs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
table! {
|
||||
maintainers (id) {
|
||||
id -> Uuid,
|
||||
name -> Text,
|
||||
email -> Text,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
packages (id) {
|
||||
id -> Uuid,
|
||||
name -> Text,
|
||||
#[sql_name = "type"]
|
||||
type_ -> Package_type,
|
||||
version -> Text,
|
||||
source -> Nullable<Text>,
|
||||
section -> Nullable<Text>,
|
||||
priority -> Nullable<Text>,
|
||||
architecture -> Text,
|
||||
essential -> Nullable<Bool>,
|
||||
installed_size -> Nullable<Int4>,
|
||||
maintainer_id -> Uuid,
|
||||
description -> Text,
|
||||
homepage -> Nullable<Text>,
|
||||
}
|
||||
}
|
||||
|
||||
joinable!(packages -> maintainers (maintainer_id));
|
||||
|
||||
allow_tables_to_appear_in_same_query!(
|
||||
maintainers,
|
||||
packages,
|
||||
);
|
||||
Reference in a new issue