aboutsummaryrefslogtreecommitdiff
path: root/src/db/schema.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/schema.rs')
-rw-r--r--src/db/schema.rs46
1 files changed, 11 insertions, 35 deletions
diff --git a/src/db/schema.rs b/src/db/schema.rs
index 40891a5..cf15dcd 100644
--- a/src/db/schema.rs
+++ b/src/db/schema.rs
@@ -7,15 +7,6 @@ table! {
}
table! {
- audio_memes (id) {
- id -> Int4,
- title -> Varchar,
- audio_id -> Int4,
- metadata_id -> Int4,
- }
-}
-
-table! {
audit_records (id) {
id -> Int4,
updated -> Timestamp,
@@ -25,18 +16,20 @@ table! {
}
table! {
- image_memes (id) {
+ images (id) {
id -> Int4,
- title -> Varchar,
- image_id -> Int4,
+ data -> Bytea,
metadata_id -> Int4,
}
}
table! {
- images (id) {
+ memes (id) {
id -> Int4,
- data -> Bytea,
+ title -> Varchar,
+ content -> Nullable<Text>,
+ image_id -> Nullable<Int4>,
+ audio_id -> Nullable<Int4>,
metadata_id -> Int4,
}
}
@@ -49,34 +42,17 @@ table! {
}
}
-table! {
- text_memes (id) {
- id -> Int4,
- title -> Varchar,
- content -> Text,
- image_id -> Nullable<Int4>,
- audio_id -> Nullable<Int4>,
- metadata_id -> Int4,
- }
-}
-
joinable!(audio -> metadata (metadata_id));
-joinable!(audio_memes -> audio (audio_id));
-joinable!(audio_memes -> metadata (metadata_id));
joinable!(audit_records -> metadata (metadata_id));
-joinable!(image_memes -> images (image_id));
-joinable!(image_memes -> metadata (metadata_id));
joinable!(images -> metadata (metadata_id));
-joinable!(text_memes -> audio (audio_id));
-joinable!(text_memes -> images (image_id));
-joinable!(text_memes -> metadata (metadata_id));
+joinable!(memes -> audio (audio_id));
+joinable!(memes -> images (image_id));
+joinable!(memes -> metadata (metadata_id));
allow_tables_to_appear_in_same_query!(
audio,
- audio_memes,
audit_records,
- image_memes,
images,
+ memes,
metadata,
- text_memes,
);