diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-03 22:55:36 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-02-03 22:55:36 -0500 |
commit | 6d0a4d03705b96b252a6b29d3b8c188b9c903b89 (patch) | |
tree | b8ea3f7459ae4c9b22a976259e637cc7a3d695c7 /src/schema.rs | |
parent | c459b5e85ef9b695b3c9a107b7cf7f08847c608f (diff) |
Refactor importer to store tasks in postgresql
Diffstat (limited to 'src/schema.rs')
-rw-r--r-- | src/schema.rs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/schema.rs b/src/schema.rs index 7cf2892..8748f3c 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -17,6 +17,16 @@ table! { } table! { + tasks (id) { + id -> Int8, + state -> Varchar, + start_at -> Timestamptz, + username -> Varchar, + payload -> Jsonb, + } +} + +table! { users (username) { username -> Varchar, password -> 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, +); |