diesel: Create migrations for users and pastes
Signed-off-by: ATechnoHazard <amolele@gmail.com>
This commit is contained in:
5 files changed
+50
No files matched your search
@@ -0,0 +1,34 @@
|
||||
table! {
|
||||
games (id) {
|
||||
id -> Int4,
|
||||
name -> Text,
|
||||
developer -> Text,
|
||||
is_goty -> Bool,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
pastes (id) {
|
||||
id -> Varchar,
|
||||
belongs_to -> Nullable<Varchar>,
|
||||
is_url -> Bool,
|
||||
content -> Text,
|
||||
}
|
||||
}
|
||||
|
||||
table! {
|
||||
users (id) {
|
||||
id -> Varchar,
|
||||
username -> Nullable<Varchar>,
|
||||
password -> Nullable<Varchar>,
|
||||
activated -> Nullable<Bool>,
|
||||
}
|
||||
}
|
||||
|
||||
joinable!(pastes -> users (belongs_to));
|
||||
|
||||
allow_tables_to_appear_in_same_query!(
|
||||
games,
|
||||
pastes,
|
||||
users,
|
||||
);
|
||||
Reference in new issue
Block a user