diff options
| author | Jokler <jokler@protonmail.com> | 2020-06-23 16:26:07 +0200 |
|---|---|---|
| committer | Jokler <jokler@protonmail.com> | 2020-06-23 16:26:07 +0200 |
| commit | fc7bd403bf41d724bd8dc3bf3b827c592c539171 (patch) | |
| tree | 1b816f68f1793dc8bf70e490196da6ae58d6f16a /src/schema.rs | |
| download | rgit-fc7bd403bf41d724bd8dc3bf3b827c592c539171.tar.gz rgit-fc7bd403bf41d724bd8dc3bf3b827c592c539171.zip | |
Diffstat (limited to 'src/schema.rs')
| -rw-r--r-- | src/schema.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/schema.rs b/src/schema.rs new file mode 100644 index 0000000..0e42988 --- /dev/null +++ b/src/schema.rs @@ -0,0 +1,26 @@ +table! { + repositories (id) { + id -> Unsigned<Bigint>, + name -> Varchar, + description -> Varchar, + owner -> Unsigned<Bigint>, + created -> Timestamp, + } +} + +table! { + users (id) { + id -> Unsigned<Bigint>, + power_level -> Integer, + name -> Varchar, + created -> Timestamp, + hash -> Char, + } +} + +joinable!(repositories -> users (owner)); + +allow_tables_to_appear_in_same_query!( + repositories, + users, +); |
