diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-01-31 22:59:10 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2020-01-31 22:59:10 -0500 |
commit | 263605f2b0404ffe04fedde644b0aaccc1e84b85 (patch) | |
tree | a54f1dcfcd78ec4b10834eb183ef29850538d12b /src/schema.rs | |
parent | 40b3e685b00f9a9f25908a85f79960913e668622 (diff) |
Exchange and store strava tokens
Diffstat (limited to 'src/schema.rs')
-rw-r--r-- | src/schema.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/schema.rs b/src/schema.rs index 055d6d0..326aac8 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -8,10 +8,25 @@ table! { } table! { + strava_tokens (username) { + username -> Varchar, + refresh_token -> Varchar, + access_token -> Varchar, + expires_at -> Timestamptz, + } +} + +table! { users (username) { username -> Varchar, password -> Varchar, } } -allow_tables_to_appear_in_same_query!(config, users,); +joinable!(strava_tokens -> users (username)); + +allow_tables_to_appear_in_same_query!( + config, + strava_tokens, + users, +); |