1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
table! {
audio (id) {
id -> Int4,
data -> Bytea,
metadata_id -> Int4,
}
}
table! {
audio_memes (id) {
id -> Int4,
title -> Varchar,
audio_id -> Int4,
metadata_id -> Int4,
}
}
table! {
audit_records (id) {
id -> Int4,
updated -> Timestamp,
updated_by -> Int8,
metadata_id -> Int4,
}
}
table! {
image_memes (id) {
id -> Int4,
title -> Varchar,
image_id -> Int4,
metadata_id -> Int4,
}
}
table! {
images (id) {
id -> Int4,
data -> Bytea,
metadata_id -> Int4,
}
}
table! {
metadata (id) {
id -> Int4,
created -> Timestamp,
created_by -> Int8,
}
}
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));
allow_tables_to_appear_in_same_query!(
audio,
audio_memes,
audit_records,
image_memes,
images,
metadata,
text_memes,
);
|