diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-04 10:48:34 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-04 10:48:34 -0500 |
commit | ca69f19d0492ae420ba54a158676d246b0307be0 (patch) | |
tree | f98ef8243cf5f2f57ffbfbfc264a26a54c9d7249 /src/schema.rs | |
parent | ffc459d5bcca732474fd770d97f7bbd55223ca9a (diff) |
Create data type for user visible entries
Diffstat (limited to 'src/schema.rs')
-rw-r--r-- | src/schema.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs index 1584424..2303714 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -8,6 +8,16 @@ table! { } table! { + entries (username, entry_type, id) { + username -> Varchar, + entry_type -> Varchar, + id -> Int8, + timestamp -> Nullable<Timestamptz>, + payload -> Jsonb, + } +} + +table! { raw_data (data_type, id) { data_type -> Varchar, id -> Int8, @@ -42,12 +52,14 @@ table! { } } +joinable!(entries -> users (username)); joinable!(raw_data -> users (username)); joinable!(strava_tokens -> users (username)); joinable!(tasks -> users (username)); allow_tables_to_appear_in_same_query!( config, + entries, raw_data, strava_tokens, tasks, |