From 6d0a4d03705b96b252a6b29d3b8c188b9c903b89 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Mon, 3 Feb 2020 22:55:36 -0500 Subject: Refactor importer to store tasks in postgresql --- src/schema.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/schema.rs') diff --git a/src/schema.rs b/src/schema.rs index 7cf2892..8748f3c 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -16,6 +16,16 @@ table! { } } +table! { + tasks (id) { + id -> Int8, + state -> Varchar, + start_at -> Timestamptz, + username -> Varchar, + payload -> Jsonb, + } +} + table! { users (username) { username -> Varchar, @@ -24,5 +34,11 @@ table! { } joinable!(strava_tokens -> users (username)); +joinable!(tasks -> users (username)); -allow_tables_to_appear_in_same_query!(config, strava_tokens, users,); +allow_tables_to_appear_in_same_query!( + config, + strava_tokens, + tasks, + users, +); -- cgit v1.2.3